当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
成品升级程序
Polygon zkEVM 基本概念
Chrome安装zotero connector 插件
How to manually download and install SAP Fiori tools - Extension Pack for Visual Studio Code
阿里的arthas使用,入门报错:Unable to attach to 32-bit process running under WOW64
C#弹出询问对话框
zynq 记录
二叉树是否对称
Notepad++更改显示背景
The establishment of simple data cache layer
PostgreSQL的 SPI_接口函数
刷题-洛谷-P1307 数字反转
37.轮播图
WIN10系统如何开启终端
visual studio 与 visual studio code
In July 2022, domestic database memorabilia
Client Side Cache 和 Server Side Cache 的区别
Go study notes (Part 1) Configuring the Go development environment
The list of Kubernetes - watch mechanism
【Web漏洞探索】跨站脚本漏洞









