Welcome! Log In Create A New Profile

Advanced

Re: Newbie questions about nginx (moving from apache)

May 28, 2011 09:55AM
Thanks. But I am a bit confused, as the simple setup is not working from port 81 (for testing):


server {
listen 81;
server_name MYDOMAIN.com www.MYDOMAIN.com;

location ^~ /site/static {
root /home/MYDOMAIN/www/static;
index index.htm index.php;
expires 30d;
gzip on;
}

location / {
proxy_pass http://127.0.0.1:80/;
proxy_redirect off;

proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

}



Then I try in my browser this:
http://MYDOMAIN.com:81/test.gif

On the server the "test.gif" file is at "/home/MYDOMAIN/www/static/test.gif".

Questions:

(1) What am I missing? Should the test.gif file be somewhere else? Should I try this with some other URL instead of the one I mention above?

(2) Also, if this worked, and I accepted Nginx to be at the front and moved Apache to the background, isn't it true that Apache would have to pass back all processed output to Nginx?

(3) Even with "proxy_redirect off", when I try http://MYDOMAIN.com:81, it actually does a hard 301 redirect to my Apache server.

What am I missing?
Subject Author Posted

Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 04:14AM

Re: Newbie questions about nginx (moving from apache)

Igor Sysoev May 27, 2011 04:26AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 04:28AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 12:19PM

Re: Newbie questions about nginx (moving from apache)

Igor Sysoev May 27, 2011 04:36AM

Re: Newbie questions about nginx (moving from apache)

Igor Sysoev May 27, 2011 12:44PM

Re: Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 12:59PM

Re: Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 11:54PM

Re: Newbie questions about nginx (moving from apache)

Thomas Love May 28, 2011 09:24AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 09:31AM

Re: Newbie questions about nginx (moving from apache)

Thomas Love May 28, 2011 09:58AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 10:28AM

Re: Newbie questions about nginx (moving from apache)

Thomas Love May 28, 2011 09:32AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 09:55AM

Re: Newbie questions about nginx (moving from apache)

Thomas Love May 28, 2011 10:06AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 10:18AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 10:20AM

Re: Newbie questions about nginx (moving from apache)

Maxim Dounin May 28, 2011 10:34AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 29, 2011 01:11AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 325
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