环境: 阿里云Centos+Apache+wordpress
1.Apache启用8080端口
添加8080监听
# vim /usr/local/apache2/conf/httpd.confconf
在Listen 80
后加入Listen 8080
...
Listen 80
# add here
Listen 8080
配置服务器
# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
添加网站:
...
<VirtualHost *:8080>
# ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/var/web2"
ServerName example.com
ErrorLog ...