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
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 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
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'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
My Nginx reverse proxy works on the same machine as the webserver(apache) as follows
server { server_name site.net;
location / {
proxy_pass http://localhost:82;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Now instead of using TCP connections to the backend apache, how can I tune it to use unix sockets?
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
My Nginx reverse proxy works on the same machine as the webserver(apache) as follows
server { server_name site.net;
location / {
proxy_pass http://localhost:82;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Now instead of using TCP connections to the backend apache, how can I tune it to use unix sockets?