centos/Redat

推荐列表 站点导航

当前位置:首页 > 操作系统 > centos/Redat >

只需要你修改apache配置文件/etc/httpd/conf/httpd.conf即可

来源:网络  作者:网友投稿  发布时间:2021-01-14 14:17
这篇文章主要先容了CentOS设置虚拟主机virtualhost使处事器支持多网站多域名的要领,涉及CentOS情况下Apache处事器虚拟主...

你只要对应设置即可,在httpd.conf最底部添加: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 NameVirtualHost *:80 VirtualHost *:80 ServerAdmin [email protected] DocumentRoot /var/www/html ServerName #ErrorLog /var/log/httpd/yourweb/error_log #留意,让处事器支持多个网站,这里我配置了以天为单元出产日志 ErrorLog |rotatelogs /var/log/httpd/yourweb/error_log%Y_%m_%d.log 86400 480 #CustomLog /var/log/httpd/yourweb/access_log common CustomLog |rotatelogs /var/log/httpd/yourweb/access_log%Y_%m_%d.log 86400 480 common /VirtualHost VirtualHost *:80 ServerAdmin [email protected] DocumentRoot /var/www/html/blog ServerName blog.yourweb.com ErrorLog /var/log/httpd/blog/error_log CustomLog /var/log/httpd/blog/access_log common /VirtualHost 如上我设置了两台虚拟主机:域名别离为 blog.yourweb.com 留意,针对Apache。

内里有个example文件,重启apache后才生效(service httpd restart) , 如何让centos(redhat)设置虚拟主机。

只需要你修改apache设置文件/etc/httpd/conf/httpd.conf即可, 1 2 3 4 5 6 7 #VirtualHost *:80 # ServerAdmin [email protected] # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #/VirtualHos 你可以参照我的设置,。

相关热词:

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://v30.fanwenzhu.com/xt/centos/12615.shtml

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

只需要你修改apache配置文件/etc/httpd/conf/httpd.conf即可

2021-01-14 编辑:网友投稿

你只要对应设置即可,在httpd.conf最底部添加: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 NameVirtualHost *:80 VirtualHost *:80 ServerAdmin [email protected] DocumentRoot /var/www/html ServerName #ErrorLog /var/log/httpd/yourweb/error_log #留意,让处事器支持多个网站,这里我配置了以天为单元出产日志 ErrorLog |rotatelogs /var/log/httpd/yourweb/error_log%Y_%m_%d.log 86400 480 #CustomLog /var/log/httpd/yourweb/access_log common CustomLog |rotatelogs /var/log/httpd/yourweb/access_log%Y_%m_%d.log 86400 480 common /VirtualHost VirtualHost *:80 ServerAdmin [email protected] DocumentRoot /var/www/html/blog ServerName blog.yourweb.com ErrorLog /var/log/httpd/blog/error_log CustomLog /var/log/httpd/blog/access_log common /VirtualHost 如上我设置了两台虚拟主机:域名别离为 blog.yourweb.com 留意,针对Apache。

内里有个example文件,重启apache后才生效(service httpd restart) , 如何让centos(redhat)设置虚拟主机。

只需要你修改apache设置文件/etc/httpd/conf/httpd.conf即可, 1 2 3 4 5 6 7 #VirtualHost *:80 # ServerAdmin [email protected] # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #/VirtualHos 你可以参照我的设置,。

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://v30.fanwenzhu.com/xt/centos/12615.shtml

相关文章

风云图片

推荐阅读

返回centos/Redat频道首页