server {
server_name 107.170.215.138;
access_log off;
location /static/ {
alias /opt/myenv/mezzanine_app/static/;
}
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
}
location / { proxy_pass http://127.0.0.1:8001; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Real-IP $remote_addr; add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"'; } }
Nginx and Gunicorn fire up without problems.Any idea what I might be missing?Why are my static files 404'ing?
--
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Mezzanine Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mezzanine-users/CrUlR8jjUw0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mezzanine-use...@googlegroups.com.
location /static/ {
alias /opt/myenv/mezzanine_app/static/;
}
location /static/ {
alias /opt/myenv/mezzanine_app/static;
}
location /static/ {
alias /opt/myenv/mezzanine_app;
}
2014/03/28 12:16:12 [error] 13768#0: *27 connect() failed (111: Connection refused) while connecting to upstream, client: 61.135.190.70, server: 107.170.215.138:8001, request: "GET
Now to try to figure out what these are saying:
2014/03/28 07:12:58 [error] 13768#0: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 220.181.51.146, server: 107.170.215.138:8001, request: "GET$
2014/03/28 07:28:45 [error] 13768#0: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 220.181.51.147, server: 107.170.215.138:8001, request: "GE$
2014/03/28 07:32:54 [error] 13768#0: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 220.181.51.140, server: 107.170.215.138:8001, request: "GE$
2014/03/28 07:45:33 [error] 13768#0: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 220.181.51.147, server: 107.170.215.138:8001, request: "GE$
2014/03/28 07:49:52 [error] 13768#0: *17 connect() failed (111: Connection refused) while connecting to upstream, client: 81.171.52.4, server: 107.170.215.138:8001, request: "GET h$
2014/03/28 07:52:08 [error] 13768#0: *19 connect() failed (111: Connection refused) while connecting to upstream, client: 189.114.248.181, server: 107.170.215.138:8001, request: "H$
2014/03/28 07:53:24 [error] 13768#0: *21 connect() failed (111: Connection refused) while connecting to upstream, client: 61.135.190.70, server: 107.170.215.138:8001, request: "GET$
2014/03/28 08:11:36 [error] 13768#0: *23 connect() failed (111: Connection refused) while connecting to upstream, client: 61.135.190.198, server: 107.170.215.138:8001, request: "GE$
2014/03/28 11:58:37 [error] 13768#0: *25 connect() failed (111: Connection refused) while connecting to upstream, client: 61.135.190.70, server: 107.170.215.138:8001, request: "GET$
2014/03/28 12:16:12 [error] 13768#0: *27 connect() failed (111: Connection refused) while connecting to upstream, client: 61.135.190.70, server: 107.170.215.138:8001, request: "GET$
$t: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8001/", host: "107.170.215.138", referrer: "http://www.baidu.com/s?wd=www"
2014/03/28 12:50:56 [error] 13768#0: *31 connect() failed (111: Connection refused) while connecting to upstream, client: 18.242.7.117, server: 107.170.215.138:8001, request: "HEAD$
2014/03/28 14:06:02 [error] 13768#0: *33 connect() failed (111: Connection refused) while connecting to upstream, client: 202.53.8.82, server: 107.170.215.138:8001, request: "GET
$t: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8001/", host: "107.170.215.138", referrer: "http://www.baidu.com/s?wd=www"
server {
server_name 107.170.215.138;
access_log off;
location /static/ {
alias /opt/myenv/mezzanine_app;
}
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
}
ALLOWED_HOSTS = [
'107.170.215.138',
'107.170.215.138.',
]
--
I don't have it on github, but it basically follows the pattern of the deploy/ngnix.conf file in the mezzanine project. Here's what it looks like:upstream example { server 127.0.0.1:8001; } server { listen 80; listen 443 ssl; server_name example.com; client_max_body_size 10M; keepalive_timeout 15; ssl_certificate conf/example.crt; ssl_certificate_key conf/example.key; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; ssl_ciphers RC4:HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { 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_set_header X-Forwarded-Protocol $scheme; proxy_pass http://example; } location /static/ { root home/admin/.virtualenvs/example/project/; access_log off; log_not_found off; } location /robots.txt { root home/admin/.virtualenvs/example/project/static;
access_log off; log_not_found off; } location /favicon.ico { root home/admin/.virtualenvs/example/project/static/img;
access_log off; log_not_found off; } }
--
As a piece of encouragement, it took me about the same amount of time struggling with it to make it work, but after getting things set up correctly it's really easy to successfully deploy with Fabric. I'd recommend it; it's a much more repeatable process.
--