一、安装apache并开启端口

[root@server ~]# netstat -ntplu | grep httpd
tcp 0.0.0.0: 0.0.0.0:* LISTEN /httpd
tcp 0.0.0.0: 0.0.0.0:* LISTEN /httpd

二、nginx配置

        location ^~ // {
proxy_pass http://127.0.0.1:8080/;
     proxy_redirect off;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
location ^~ // {
proxy_pass http://127.0.0.1:8000/;
     proxy_redirect off;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
05-28 10:49