在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/PHP  Linux  Office/ nginx 反向代理到iis

nginx 反向代理到iis

目前問題是不管訪問哪個頁面,顯示內(nèi)容都是首頁,只有地址欄的鏈接在變

下面是我的配置截圖,

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;
}
回答
編輯回答
久礙你
location / {
    try_files $uri $uri/ /index.php$is_args$args;
    autoindex on;

}

這里的/index.php$is_args$args,把$uri丟掉了,所以訪問只有首頁。

2018年9月23日 15:25