目前问题是不管访问哪个页面,显示内容都是首页,只有地址栏的链接在变下面是我的配置截图,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
丢掉了,所以访问只有首页。
添加回答
举报
0/150
提交
取消