|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!翻开Apache设置文件httpd.conf,如默许情形下为/etc/httpd/conf/httpd.conf
#vi/etc/httpd/conf/httpd.conf
把以下假造机的设置加在httpd.conf文件开端便可
NameVirtualHost*:80//注重:这行默许是有#号的,记得要往失落
##VirtualHostexample:
#AlmostanyApachedirectivemaygointoaVirtualHostcontainer.
#ThefirstVirtualHostsectionisusedforallrequeststhatdonot
#matchaServerNameorServerAliasinanyblock.
#ServerAdminadmin@centoscn.com
<VirtualHost*:80>
ServerAdminadmin@centoscn.com
DocumentRoot/var/www/html/centos
ServerNamewww.centoscn.com
ServerAliaswww.centoscn.com
ErrorLoglogs/centoscn.com-error_log
CustomLoglog/centoscn.com-access_logcommon
</VirtualHost>
<VirtualHost*:80>
ServerAdminadmin@gamekey.com.cn
DocumentRoot/var/www/html/gamekey.com.cn
ServerNamewww.gamekey.com.cn
ServerAliaswww.gamekey.com.cn
ErrorLoglogs/gamekey.com.cn-error_log
CustomLoglogs/gamekey.com.cn-access_logcommon
</VirtualHost>
欢迎大家来到仓酷云论坛! |
|