LINUXapache服务器

vim /etc/httpd/conf/httpd.conf //编辑主配置文件
ServerRoot “/etc/httpd” //设置Apache的主目录
Timeout 120 //设置请求超时
Listen 80 //设置监听端口
ServerAdmin [email protected] //设置管理员邮箱
ServerName 192.168.0.3:80 //设置主机或IP
DocumentRoot “/var/www/html” //设置Apache文档目录
DirectoryIndex index.html //设置主页文件
AddDefaultCharset GB2312 //设置网站编码
编辑主页文件用作测试:
cd /var/www/html
echo “This is web test sample.”>>index.html
chmod 705 index.html
重新加载服务:
service httpd restar
<参考>

猜你喜欢

转载自blog.csdn.net/qq_37699336/article/details/80009072