i want to rewrite and proxy EVERY url
by this configure, this url not proxy: http://example.com/qwe/ewq
and proxy work when use this: http://example.com
.
i think one solution is remove everything else from url.
another one is just rewrite and not redirect.
...
this is my nginx.conf:
server {
listen 10.10.10.10:9999;
server_name _;
# set $test_uri http://example.com ;
# set $test_uri $scheme://$host$request_uri;
# if ($test_uri != $scheme://$host$uri) {
# rewrite ^ $scheme://$host$uri permanent;
# }
# if (-e $args) {
# set $args /;
# }
# if ($request_uri != $test_uri) {
# rewrite ^ http://example.com;
# }
# location /(.*) {
# rewrite ^ http://example.com ;
# }
# rewrite ^http://(.*)/(.*)$ http://$1/ last;
# rewrite ^(.*)/(.*) $scheme://$1/ permanent;
location / {
#rewrite ^(.*)$ / permanent ;
proxy_pass http://192.168.1.10:8080/;
}
}