My conf looks like this.<br>
<br>
server {<br>
listen <a href="http://192.168.1.1:80">192.168.1.1:80</a>;<br>
server_name <a href="http://example.com">example.com</a>;<br>
<br>
error_page 503 /maint/503.html;<br>
<br>
location /maint/503.html {<br>
internal;<br>
}<br>
<br>
location /maint/ {<br>
root /etc/nginx/html;<br>
}<br>
<br>
server {<br>
listen <a href="http://192.168.1.1:80">192.168.1.1:80</a>;<br>
server_name <a href="http://example.com">example.com</a>;<br>
<br>
location / {<br>
proxy_pass <a href="http://192.168.1.2">http://192.168.1.2</a>;<br>
}<br>
}<br><br><br>To show the 503 page instead of my site, I uncomment the top server block. When I want to bring the site back, I comment the top block out. The /maint/ location was what I changed to get the css and images to work. However, I'm not sure that it's the best solution. Also, I'm assuming that there's a better way to show/hide the 503 page than commenting out the whole server block.<br>
<br><div class="gmail_quote">On Wed, Mar 28, 2012 at 5:16 PM, Francis Daly <span dir="ltr"><<a href="mailto:francis@daoine.org">francis@daoine.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Mar 28, 2012 at 03:42:45PM -0400, Bai Shen wrote:<br>
<br>
Hi there,<br>
<br>
</div><div class="im">> I got my error page to show up. However, the css and image files don't<br>
> load. I tried changing the location, but that doesn't seem to work.<br>
><br>
> Any suggestions?<br>
<br>
</div>Try changing the location again. Maybe it will work this time.<br>
<br>
<br>
Or alternatively:<br>
<br>
Please fill in the details:<br>
<br>
> > what did you do?<br>
<br>
That will be something like "curl -i <a href="http://myserver/myfile.css" target="_blank">http://myserver/myfile.css</a>"<br>
<br>
> > what did you see?<br>
<br>
That will be whatever you got back -- the content of /var/tmp/myfile.css,<br>
or the content of another file, or some error message. There might be<br>
more details available in log files.<br>
<div class="im"><br>
> > what did you expect to see?<br>
<br>
</div>That will be something like "http 200 and the content of<br>
/usr/local/nginx/html/myfile.css".<br>
<div class="im"><br>
> > and the more specific you are, the easier it will be for someone else to<br>
> > reproduce the problem you are reporting.<br>
<br>
</div>Provide the relevant part of nginx.conf from a machine where you saw<br>
the problem. If you don't know what is the relevant part, provide the<br>
whole thing.<br>
<br>
It doesn't have to be your "live" config, but it should be a config that<br>
you ran on a test machine. The smaller the config, the better.<br>
<br>
If you make it easy for someone to run the same server config as you,<br>
and run the same client commands as you, and see the same error output<br>
as you; then you make it easy for that person to try to help resolve the<br>
problem you saw.<br>
<br>
If you don't, you don't.<br>
<div class="HOEnZb"><div class="h5"><br>
f<br>
--<br>
Francis Daly <a href="mailto:francis@daoine.org">francis@daoine.org</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br>