I’m having difficulty getting nginx to proxy in front of a Apache
server,
the Apache server displays a auto generated directory list, but when
I try from nginx all I get is a 403 error message.
Is there some kind of problem trying to do that?
Posted at Nginx Forum:
I'm having difficulty getting nginx to proxy in front of a Apache server, the Apache server displays a auto generated directory list, but when I try from nginx all I get is a 403 error message. Is there some kind of problem trying to do that?
you don’t have auto indexing on in nginx, set it to on and restart nginx
Regards,
Payam Tarverdyan Chychi
Network Engineer
Sent from my iPhone
I tried that, but it doesn’t work,
basically I just need to proxy the Apache page,
but it’s not doing/allowing it.
Posted at Nginx Forum:
I'm having difficulty getting nginx to proxy in front of a Apache server, the Apache server displays a auto generated directory list, but when I try from nginx all I get is a 403 error message. Is there some kind of problem trying to do that?
Please post your config file. Without looking at the configuration file
it is hard to diagnose the problem.
Sameer
Posted at Nginx Forum:
I'm having difficulty getting nginx to proxy in front of a Apache server, the Apache server displays a auto generated directory list, but when I try from nginx all I get is a 403 error message. Is there some kind of problem trying to do that?
I run 1 server, with 3 virtualhosts,
the other 2 vhosts work fine, its just the one with the apache
autoindex.
NGINX config
user www;
worker_processes 1; # increase value for multiple CPU’s - 2 CPU’s = 2
worker_processes
events {
worker_connections 1024; # maximum concurrent connections to server
}
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 64;
include vhosts/*.conf; # include all configuration files in
/usr/local/etc/nginx/vhosts/
}
Virtual host config
START upstream
upstream my-stream {
server my.server.com ;
}
END upstream
server {
listen 80;
server_name lb.my.server.com ;
location /
{
proxy_pass http://my-stream ; # Use upstream for proxy &
load balance
root /usr/local/www/lb.my.server.com/cache; # Caching
directory for this virtual host on nginx
autoindex on;
}##end location
proxy_store on;
proxy_store_access user:rw group:rw all:r; # set cache
access permissions
proxy_set_header Host $host; # Forward IP headers to Apache
proxy_set_header X-Real-IP $remote_addr; # Forward IP
headers to Apache
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #
Forward IP headers to Apache
} ##end server
Posted at Nginx Forum:
I'm having difficulty getting nginx to proxy in front of a Apache server, the Apache server displays a auto generated directory list, but when I try from nginx all I get is a 403 error message. Is there some kind of problem trying to do that?