首先编辑apache的配置文件,/etc/httpd/conf/httpd.conf或者/usr/local/apache/conf/httpd.conf
加入如下内容:
<VirtualHost *:8050>
ServerAdmin www.wangzai.net
DocumentRoot "/home/mysrc/wangzai"
ServerName www.wangzai.net
ServerAlias www.wangzai.net
ErrorLog "logs/www.wangzai.net-error_log"
CustomLog "logs/www.wangzai.net-access_log" common
<Directory "/home/mysrc/wangzai">
order allow,deny
allow from all
</Directory>
</VirtualHost>
nginx的代理,然后在nginx配置文件增加www.wangzai.net
如下:server_name www.wangzai.net wangzai.net
然后重启apache和nginx就OK了。
本文出自 “11083647” 博客,请务必保留此出处http://11093647.blog.51cto.com/11083647/1752461
原文地址:http://11093647.blog.51cto.com/11083647/1752461