Hello,<br><br>I would like to set a directive in a common configuration file, and explicitly override it if need be. Example:<br><br># proxy.conf<br>proxy_redirect off;<br>proxy_set_header Host $host;<br>
proxy_set_header X-Real-IP $remote_addr;<br>proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br><br>client_max_body_size 2m;<br>client_body_buffer_size 128k;<br><br>proxy_connect_timeout 300;<br>
proxy_send_timeout 300;<br>proxy_read_timeout 300;<br><br>proxy_buffer_size 4k;<br>proxy_buffers 4 32k;<br>proxy_busy_buffers_size 64k;<br>proxy_temp_file_write_size 64k;<br><br># nginx.conf/0.6.29<br>
# snippage<br> server {<br> listen <a href="http://127.0.0.1:443">127.0.0.1:443</a>;<br> server_name <a href="http://wiki.foo.com">wiki.foo.com</a>;<br><br> access_log logs/wiki.ssl.access.log main;<br>
rewrite ^/$ $scheme://$server_name/wiki/ redirect;<br><br> ssl on;<br><br> location ~ ^/wiki/ {<br> proxy_pass <a href="http://1.2.3.4:80">http://1.2.3.4:80</a>;<br> proxy_redirect <a href="http://wiki.foo.com/">http://wiki.foo.com/</a> /;<br>
proxy_set_header X-FORWARDED_PROTO https;<br> include proxy.conf;<br> }<br> }<br><br>What I would like to happen is for the proxy_redirect in the location{} section to override the "off" setting in proxy.conf. Currently this does not seem to happen. Moving the include line to the top and the bottom of the location block doesn't make a difference. Is there a nice way to do this other than commenting out the setting in proxy.conf?<br>
<br>Thanks!<br><br>-- <br>Adam<br><a href="mailto:zellster@gmail.com">zellster@gmail.com</a>