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
I'm trying to setup of proxy using nginx, but it redirects rather than proxy it (at least that's what it looks like).
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
What the quickest and cleanest solution if you want to proxy URL request to two different backends via proxypass based on location.
location /app1/ {
alias /var/www/ruby/public;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
try
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 working configuration in nginx which is like this
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_b
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
I am using nginx as a reverse proxy for a tomcat setup, and everything works fine for the MOST part, the only issue I am having is that every request to an http address results in a new JSESSION ID being created(this doesn't happen in http), here is the relevant part of the NGINX configuration:
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
prox
I'm using nginx as a reverse proxy for website running on IIS 7.5. Website is bound to sub-1.foo.bar.