server {
listen 80;
server_name www.hehehe.com;
charset utf-8;
location /test {
include uwsgi_params;
uwsgi_pass 127.0.0.1:3031;
}
}
For requests like this at http://hehehe.com/test/index
The reverse proxy reaches uwsgi, which is a django application
Then I just want to proxy the url response of the /index part, not /test/index
Now/test/index causes my django url route to fail to match.
PHP中文网2017-05-16 17:17:51
server {
listen 80 default_server;
client_max_body_size 10M;
client_body_buffer_size 128k;
server_name $host;
index index.html;
root /website/$host;
location / {
}
location ~ /dev/ {
rewrite /dev/(.*)$ / break;
proxy_pass http://localhost:3000;
}
}
Rewrite it