Skip to content

Instantly share code, notes, and snippets.

@matthutchinson
Created June 20, 2013 13:38
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matthutchinson/5822750 to your computer and use it in GitHub Desktop.
Save matthutchinson/5822750 to your computer and use it in GitHub Desktop.
your-app.dev
server {
listen 443 ssl;
server_name your-app.dev;
root /path/to/your-app/public;
index index.html index.htm;
### SSL log files ###
access_log logs/your-app.dev-ssl-access.log;
error_log logs/your-app.dev-ssl-error.log;
### SSL cert files ###
ssl_certificate ssl/your-app.dev.crt;
ssl_certificate_key ssl/your-app.dev.key;
location / {
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_redirect off;
proxy_pass http://localhost:20559;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
proxy_set_header X-Forwarded-Proto https;
}
}
@ahmadseleem
Copy link

SSL log files

access_log /usr/local/etc/nginx/logs/your-app.dev-ssl-access.log;
error_log /usr/local/etc/nginx/logs/your-app.dev-ssl-error.log;

because by default it will look to logs dire under here:
/usr/local/Cellar/nginx/1.6.0_1/logs/

So, it seem I am gonna have to change the that every time I update nginx or what do you think would be a better dir then ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment