当前位置:网站首页>Apache服务器的配置[通俗易懂]
Apache服务器的配置[通俗易懂]
2022-08-04 19:56:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
修改Apache服务器的配置文件
Apache配置文件路径 : /etc/httpd/conf.d
映射域名配置文件: vim /etc/httpd/conf.d/vhosts.conf
<Virtualhost *:80>
ServerName www.ahzy.top
DocumentRoot /var/www/html
</Virtualhost>其中:
ServerName 为域名 DocumentRoot 为html主页的路径
Apache 操作命令行
- 启动apahce的命令:
/usr/local/apache2/bin/apachectl start apache - 停止apache的命令:
/usr/local/apache2/bin/apachectl stop- 重启apache的命令:
/usr/local/apache2/bin/apachectl restart要在重启 Apache 服务器时不中断当前的连接,则应运行:
/usr/local/sbin/apachectl graceful如果当前用户的apache已经安装为linux的服务的话,可以使用以下命令进行以上操作。
- 启动apache
service httpd start- 停止服务apache
service httpd stop- 重新启动apache
service httpd restart发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/106428.html原文链接:https://javaforall.cn
边栏推荐
猜你喜欢
随机推荐
really time ntp服务启动命令
37.轮播图
宏定义小方法
The difference between Client Side Cache and Server Side Cache
Elastic Search 根据匹配分和热度分排序
Aura clock chip generation configuration file script
"WAIC 2022 · hackers marathon" two ants wealth competition invited you to fight!
「 WAIC 2022 · 黑客马拉松」蚂蚁财富两大赛题邀你来战!
华为企业组网实例:VRRP+MSTP典型组网配置
02 ts 变量定义,类型
jMeter Thread group 对应的 constant timer
【Attention演变史】翻译模型seq2seq (第二弹)
[Awards for Essays] Autumn recruitment special training to create your exclusive product experience
数据安全解决方案的发展
awk statistical average max min
基于HDF的LED驱动程序开发(2)
WIN10系统如何开启终端
密码学系列之:PEM和PKCS7,PKCS8,PKCS12
2022年国内手机满意度榜单:华为稳坐国产品牌第一
带你了解数据分布式存储原理









