首先编辑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了。
转载于:https://blog.51cto.com/11093647/1752461