i running nginx inside docker container. below nginx.conf file:
worker_processes 4; events { worker_connections 1024; } http { types { text/css css; } upstream appserver { server:3000; } server { listen 80; server_name localhost; root /public; try_files $uri/index.html $uri @appserver; location @appserver { proxy_pass http://appserver; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header host $http_host; proxy_redirect off; } error_page 500 502 503 504 /500.html; client_max_body_size 4g; keepalive_timeout 10; } } i have static files inside /public. there container rails behind nginx container.
when curl http://192.168.59.103/landing_page.css, css displays (192.168.59.103 address boot2docker ip). however, when visit page directly, css not visible. including stylesheet this:
<link rel="stylesheet" type="text/css" href="/landing_page.css" /> it displays in chrome inspector:
however, response empty:
any ideas on at? i'm pretty stumped
solved it. answer here: nginx finds css doesn't load index.html
...but, on top of ran additional snag: css file cached, had shift+reload work.


Comments
Post a Comment