upstream app {
server localhost:3000;
}
server {
...
# If I comment this location out, images are displayed on the website
location ~* \.(?:jpg|jpeg|png|gif|swf|xml|txt|css|js)$ {
expires 6004800;
add_header Pragma public;
add_header Cache-Control "publi
我需要知道如何在nginx中对某些url模式进行代理传递。
我写了一封信,但我不确定它是否如我所愿。我想要的是
1. if the url matches '/member-chat' it needs to be redirected the proxy pass
2. anything else needs to be re-written as below
写的是对的吗?
location ^/member-chat {
proxy_pass http://lxx.com:5280/http-bind;
}
location !/member-chat {
我有以下nginx服务器配置:
server {
...
location / {
# First attempt to serve request as file, then
# as directory, then fall back to proxy.
try_files /maintenance.php $uri @proxyPass;
}
location @proxyPass {
proxy_pass http://1.1.1.1;
我想改变Nginx的位置。
这是我的Nginx _ >>> >>>接收到的url
这就是我想要的,>>>把google.com从uri中剪下来,只把/about送到我的proxy_pass
uri中的/about是动态的,它可以是任何东西。
这是我的配置
location /google.com {
rewrite # This is where I do not know what to do
proxy_pass http://google.com;
pro