example reverse proxy configurations for nginx and apache

nginx:

server {
    listen 80;
    server_name www.example.com;

    location / {
        proxy_pass http:_localhost:8000;
    }
}

subdirectory example:

server {
    listen 80;
    server_name www.example.com;

    location /foo/ {
        proxy_pass http:_localhost:8000/;
    }
}

[server] ROOT_URL = http:_www.example.com/foo/

apache

<VirtualHost *:443>
        ...
        <Proxy *>
                 Order allow,deny
                 Allow from all
        </Proxy>

        ProxyPass /foo http:_127.0.0.1:8000
        ProxyPassReverse /foo http:_127.0.0.1:8000
</VirtualHost>