Welcome! Log In Create A New Profile

Advanced

Re: Nginx proxy-caching Apache autoindex

December 08, 2009 01:34AM
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
Subject Author Posted

Nginx proxy-caching Apache autoindex

christogouws December 07, 2009 03:17AM

Re: Nginx proxy-caching Apache autoindex

Payam Chychi December 07, 2009 03:52AM

Re: Nginx proxy-caching Apache autoindex

christogouws December 07, 2009 04:29AM

Re: Nginx proxy-caching Apache autoindex

sameer December 07, 2009 07:17AM

Re: Nginx proxy-caching Apache autoindex

christogouws December 08, 2009 01:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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