- location = /index.php {
- try_files /not_exists @swoole;
- }
- location / {
- try_files $uri $uri/ @swoole;
- }
- location /mobile/favicon.ico {
- try_files $uri /favicon.ico;
- }
- location @swoole {
- set $suffix "";
- if ($uri = /index.php) {
- set $suffix "/";
- }
- proxy_set_header Host $http_host;
- proxy_set_header Scheme $scheme;
- proxy_set_header SERVER_PORT $server_port;
- proxy_set_header REMOTE_ADDR $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection $connection_upgrade;
- # IF https
- # proxy_set_header HTTPS "on";
- proxy_pass http://127.0.0.1:5101$suffix;
- }
复制代码 以上是nginx设置内容,编辑后提示(下图)
请问怎么修改才可以?谢谢大神!!
|
|