August 19, 2011 10:24AM
Hi Everyone,

I am having an odd issue here with Ngnix as a my proxy for my pages served up by Apache. This is a pretty vanilla proxy setup - the issues I am facing (and my respective config) are as follows:

I have my DNS and everything setup properly so I know that is not an issue. All requests to licensing.fixflyer.com and licensing are sent to the Ngnix web proxy and I can confirm that it is not in fact any DNS issue. With that -




The issue:

Whenever I type licensing/downloads or licensing.fixflyer.com/downloads it redirects me to http://licensing/licensing.fixflyer.com/downloads and http://licensing.fixflyer.com/licensing.fixflyer.com/downloads (respectively depending on which request was made) - the same goes for the downloads domain as well.

I am thinking I need to add a location block for every directory that I want to proxy for but that seems a little wrong - shouldnt any request to licensing.fixflyer.com regardless of the directory path be automatically resolved and not auto-appended as such?



My configuration


worker_processes 50;

events {
worker_connections 1024;
}

http {
# Debugging M2 error
error_log /var/log/nginx/debug.err.log debug;
proxy_buffer_size 64k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
client_body_buffer_size 1024m;
keepalive_timeout 500;
#
include mime.types;
default_type application/octet-stream;
sendfile on;

client_max_body_size 500m;


server {
listen 80;
server_name licensing.fixflyer.com licensing;

location / {
proxy_pass http://web.ny1.prod.fixflyer.com/licensing.fixflyer.com/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

}

#
# Download portal
#
server {
listen 80;
server_name downloads downloads.fixflyer.com;
location / {
proxy_pass http://web.ny1.prod.fixflyer.com/downloads.fixflyer.com/;
#proxy_set_header Host $http_host;
proxy_set_header Host $Host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
#location uploads {
# proxy_pass http://$http_host/uploads;
# proxy_set_header Host $http_host;
# proxy_set_header X-Real-IP $remote_addr;
#}
}

}
Subject Author Posted

Ngnix as Proxy with Multiple Directories Issue

ckozler August 19, 2011 10:24AM

Re: Ngnix as Proxy with Multiple Directories Issue

Igor Sysoev August 19, 2011 10:44AM

Re: Ngnix as Proxy with Multiple Directories Issue

ckozler August 19, 2011 10:51AM

Re: Ngnix as Proxy with Multiple Directories Issue

ckozler August 19, 2011 10:52AM

Re: Ngnix as Proxy with Multiple Directories Issue

Igor Sysoev August 19, 2011 10:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 321
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready