VPS侦探论坛

 找回密码
 注册
查看: 7383|回复: 1

nginx jsp问题,方向代理不成功!

[复制链接]
发表于 2011-5-5 15:54:06 | 显示全部楼层 |阅读模式

  1. include emlog.conf;
  2.                 location ~ .*\.(php|php5)?$
  3.                         {
  4.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  5.                                 fastcgi_index  index.php;
  6.                                 include fcgi.conf;
  7.                         }
  8.                 location ~ .*.jsp$ {     #匹配以jsp结尾的,tomcat的网页文件是以jsp结尾         
  9.                 index   index.jsp;
  10.                 proxy_pass      http://127.0.0.1:8080; #主要在这里,设置一个代理
  11.                 }

  12.                 location /nginxstatus {
  13.                 stub_status on;
  14.                 access_log on;
  15.                 auth_basic "nginxstatus";
  16.                 auth_basic_user_file /usr/local/nagois/etc/htpasswd.users;
  17.                 }

  18.                 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  19.                         {
  20.                                 expires      30d;
  21.                         }

  22.                 location ~ .*\.(js|css)?$
  23.                         {
  24.                                 expires      12h;
  25.                         }
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-5-5 16:49:23 | 显示全部楼层


location ~ .jsp$

改成这样吧
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-20 10:52 , Processed in 0.025041 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表