Welcome! Log In Create A New Profile

Advanced

Re: how to configure nginx with running apache ?

April 17, 2014 07:04AM
> Hence I have to place nginx before apache without disturbing the
> setup.
>

works seemlessly and speeds up your apache, when using proxy_cache, assuming your
apache listens on 8080


server {
listen 80;
server_name myhost;
location / {
root /path/to/myapp/public;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://apache:8080;
}
}

from this basic snippet you can go on and test different setups
with additional nginx-virtualhosts before making changes work in your prod-environment


server {
# this is for testing new setups
listen 81;
server_name myhost;
location / {
root /path/to/myapp/public;
proxy_cache cache;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://apache:8080;
}
}
SubjectAuthorPosted

how to configure nginx with running apache ?

Joydeep BakshiApril 17, 2014 04:10AM

Re: how to configure nginx with running apache ?

mexApril 17, 2014 05:57AM

Re: how to configure nginx with running apache ?

GreenGeckoApril 17, 2014 06:36AM

Re: how to configure nginx with running apache ?

mexApril 17, 2014 06:50AM

Re: how to configure nginx with running apache ?

Steve WilsonApril 17, 2014 06:58AM

Re: how to configure nginx with running apache ?

Joydeep BakshiApril 17, 2014 06:58AM

Re: how to configure nginx with running apache ?

mexApril 17, 2014 07:04AM

Re: how to configure nginx with running apache ?

Joydeep BakshiApril 17, 2014 08:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready