I'm trying to setup of proxy using nginx, but it redirects rather than proxy it (at least that's what it looks like).
I'm using nginx as a reverse proxy for website running on IIS 7.5. Website is bound to sub-1.foo.bar.
I'm trying to configure Nginx to proxy stuff on a subdomain: dev.int.com
I want dev.int.com to be proxied to IP:8080, and dev.int.com/stash to be proxied to IP:7990
Here's my current config file
server {
listen 80;
server_name dev.int.com;
access_log off;
location / {
proxy_pass http://IP:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote
This is my config file for nginx to allow it to respond only to domain1.com, and not domain2.com
server {
server_name .domain1.com;
root /var/www/;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_ho
i have a server
server {
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
access_log /var/log/nginx/localhost.access.log;
location ~* \.(png|ico)$ {
root /home/anatoly/gyazo;
}
location / {
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Ho
Here's my abbreviated nginx vhost conf:
upstream gunicorn {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
listen 443 ssl;
server_name domain.com ~^.+\.domain\.com$;
location / {
try_files $uri @proxy;
}
location @proxy {
proxy_pass_header Server;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_hea
I have an nginx / gunicorn / django setup as follows:
Nginx
server {
listen 80;
server_name myserver.com;
root /www/python/apps/pyapp/;
access_log /var/log/nginx/myserver.com.access.log;
error_log /var/log/nginx/myserver.com.error.log;
location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set
I want to redirect HTTP traffic and HTTPS traffic to a backend Flask application amd I have the snippet below in my nginx.conf which works for https but not for http
server {
listen 80;
listen 443 ssl;
ssl_certificate /usr/local/nginx/server.crt;
ssl_certificate_key /usr/local/nginx/server.key;
location / {
proxy_redirect off;
proxy_cache off;
proxy_pass http://1
I want to setup proxy in nginx:
location ~ ^/m/([^/]*)/([^/]*)/([^/]*)$ {
proxy_pass http://127.0.0.1:8080/redir/m/$1/$2/$3;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
It works but this address
http:// myhost/m/test//ss
gets translated to
http:// 127.0.0.1:8080/redir/m/te