亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

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 關注
  • 1679 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號