server { listen 80; server_name myforums.com alias www.myforuns.com; access_log logs/myforums.com_access.log main; error_log logs/myforums.com_error.log debug; location / { proxy_pass http://10.10.6.230; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache myforum; proxy_cache_key backend$request_uri; proxy_cache_valid 200 301 302 20m; proxy_cache_valid 404 1m; proxy_cache_valid any 15m; proxy_cache_use_stale error timeout invalid_header updating; } location /admin { proxy_pass http://10.10.6.230; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }