I am new to Nginx and have a reverse proxy to an upstream glassfish server. I am trying to set up a custom 503 page for when the app is down for maintenance. I have been failing to do so for several hours now. The maintenance.html page contains a css and jpg link. These are showing up when I am forwarded to the maintenance page. All I get is the text of the page and a broken image.
CentOS 6.5 nginx 1.4.4 (from nginx repo)
upstream glassfish { server <upstream IP>:8181 max_fails=1; } server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; error_page 404 502 /static/error.html; error_page 503 /static/maintenance.html; location ~ ^/static/ { internal; } location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass https://glassfish; port_in_redirect off; } } The error that shows up in the access.log is
[19/Dec/2013:17:49:17 -0500] "GET /static/main.css HTTP/1.1" 404 1136 "http:/// [19/Dec/2013:17:49:18 -0500] "GET /static/header-logo.jpg HTTP/1.1" 404 1136 "http:///
I have checked that /etc/nginx/html/static/header-logo.jpg exists
I'm sure it's simple enough, but I just cannot figure it out!