为了账号安全,请及时绑定邮箱和手机立即绑定

nginx 反向代理到iis

nginx 反向代理到iis

吃鸡游戏 2018-09-24 16:53:04
目前问题是不管访问哪个页面,显示内容都是首页,只有地址栏的链接在变下面是我的配置截图,location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css|mp4|doc|docx|ppt|pptx|xls|xlsx)$ {     #expires 10d;     proxy_pass http://http://127.0.0.1:8081;} location / {     try_files $uri $uri/ /index.php$is_args$args;     autoindex on; } location /app/ {    if (!-e $request_filename){         rewrite  ^/app/(.*)$  /app/public/index.php?s=/$1  last;        break;     } } #rewrite ^/(.*)$ /index.php/$1 last; location ~ \.php$ {     proxy_pass http://127.0.0.1:8888;     proxy_set_header Host $http_host;     proxy_set_header X-Forwarded-Host $host;     proxy_set_header Cookie $http_cookie;     proxy_set_header X-Forwarded-Server $host;     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;     proxy_set_header X-Real-IP $remote_addr;     #include snippets/fastcgi-php.conf;      #fastcgi_pass php_upstream;             #fastcgi_pass unix:/run/php/php7.0-fpm.sock; }
查看完整描述

1 回答

?
汪汪一只猫

TA贡献1898条经验 获得超8个赞

location / {    try_files $uri $uri/ /index.php$is_args$args;    autoindex on;

}

这里的/index.php$is_args$args,把$uri丢掉了,所以访问只有首页。


查看完整回答
反对 回复 2018-09-24
  • 1 回答
  • 0 关注
  • 1666 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信