接上一篇博文

vim /usr/local/nginx/conf/vhosts/proxy.conf

server {

  listen 80;

  server_name www.111.com;

  location /

     {

     proxy_pass      http://127.0.0.1:8000/;

     proxy_set_header Host   $host;

     proxy_set_header X-Real-IP      $remote_addr;

     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

     }

   }

/usr/local/nginx/sbin/nginx -t  检查

/usr/local/nginx/sbin/nginx 启动如果没有起到脚本可以/usr/local/nginx/sbin/nginx -s reload

测试:curl -x127.0.0.1:80  www.111.com/111.jsp