分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

apache

发布时间:2023-09-06 01:38责任编辑:顾先生关键词:apache

[1] 安装 httpd.

[root@linuxprobe ~]# yum -y install httpd

# 删除默认欢迎页面

[root@linuxprobe ~]# rm -f /etc/httpd/conf.d/welcome.conf

[2] 配置httpd,将服务器名称替换为您自己的环境

[root@linuxprobe ~]# vi /etc/httpd/conf/httpd.conf

# line 86: 改变管理员的邮箱地址(在 vim 里查看行数 :set number

ServerAdmin root@linuxprobe.org

# line 95: 改变域名信息

ServerName www.linuxprobe.org:80

# line 151: none变成All

AllowOverride All

# line 164: 添加只能使用目录名称访问的文件名

DirectoryIndex index.html index.cgi index.php

# add follows to the end

# server‘s response header(安全性)

ServerTokens Prod

# keepalive is ON KeepAlive On

[root@linuxprobe ~]# systemctl start httpd

[root@linuxprobe ~]# systemctl enable httpd

[3] 如果Firewalld正在运行,请允许HTTP服务。,HTTP使用80 / TCP

[root@linuxprobe ~]# firewall-cmd --add-service=http --permanent

   提示FirewallD is not running:https://jingyan.baidu.com/article/5552ef47f509bd518ffbc933.html

    1.通过systemctl status firewalld查看firewalld状态,发现当前是dead状态,即防火墙未开启。

    2.通过systemctl start firewalld开启防火墙,没有任何提示即开启成功。

    3.再次通过systemctl status firewalld查看firewalld状态,显示running即已开启了。

    4.如果要关闭防火墙设置,可能通过systemctl stop firewalld这条指令来关闭该功能。

success  #成功

[root@linuxprobe ~]# firewall-cmd --reload

success   #成功

apache

启动
systemctl start httpd
停止
systemctl stop httpd
重启
systemctl restart httpd


mysql
启动
systemctl start mysqld
停止
systemctl stop mysqld
重启
systemctl restart mysqld


php-fpm
启动
systemctl start php-fpm
停止
systemctl stop php-fpm
重启
systemctl restart php-fpm


nginx
启动
systemctl start nginx
停止
systemctl stop nginx
重启
systemctl restart nginx

http://blog.csdn.net/wh211212/article/details/52982917

apache

原文地址:https://www.cnblogs.com/nyfz/p/8338051.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved