wdcp添加tomcat,同时支持php和java教程

2019-10-16 16:12:15王冬梅
  • listen 80;
  • server_name www.myweb.com myweb.com;
  • #root /www/web/master_myweb_com/public_html;
  • index index.html index.jsp index.htm;
  • error_page 400 /errpage/400.html;
  • error_page 403 /errpage/403.html;
  • error_page 404 /errpage/404.html;
  • error_page 405 /errpage/405.html;
  • location ~ .jsp$ {
  • proxy_pass http://127.0.0.1:8080;
  • include naproxy.conf;
  • }
  • location / {
  • try_files $uri @tomcat;
  • }
  • location @tomcat {
  • proxy_pass http://127.0.0.1:8080;
  • include naproxy.conf;
  • }
  • access_log /www/web_logs/myweb_com_access.log wwwlogs;
  • error_log /www/web_logs/myweb_com_error.log;
  • }

    重新加载nginx配置文件或重启nginx

    1. [root@E vhost]# service nginxd reload