当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
03 ts类型缩小,函数
really time ntp service start command
Spark提交参数说明和常见优化
[Awards for Essays] Autumn recruitment special training to create your exclusive product experience
高效目标检测:动态候选较大程度提升检测精度(附论文下载)
搭建MyCat2双主双从的MySQL读写分离
nr part calculation
Force KouTi (5), the longest text string back
基于HDF的LED驱动程序开发(2)
腾讯云胡启明:Kubernetes云上资源的分析与优化
如何使用 jMeter Parallel Controller - 并行控制器以及一些常犯的错误
nr部分计算
电脑一键重装系统后连不上远程了?教你设置的方法
搭建MyCat2一主一从的MySQL读写分离
Aura clock chip generation configuration file script
String中的hashcode缓存以及HashMap中String作key的好处
《支付宝体验设计精髓》一书,跟测试相关性知识记录
How to use the Chrome DevTools performance tab
Highlights of some performance tests
笔记本WIFI无法上网(无Internet访问权限)