标签:server 开启 set proxy 反向代理 location 无效 test inux
server { root /data/wwwroot/; server_name www.test.com; location / { proxy_http_version 1.1; proxy_set_header Connection "keep-alive"; proxy_set_header X-Real-IP $remote_addr; if (!-f $request_filename) { proxy_pass http://127.0.0.1:9501; } } }
<IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f #RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] fcgi下无效 RewriteRule ^(.*)$ http://127.0.0.1:9501/$1 [QSA,P,L] #请开启 proxy_mod proxy_http_mod request_mod </IfModule>
标签:server 开启 set proxy 反向代理 location 无效 test inux
原文地址:https://www.cnblogs.com/richerdyoung/p/11072469.html