Last active
December 11, 2015 21:58
-
-
Save moqada/4666101 to your computer and use it in GitHub Desktop.
nginx config file for fulcrum
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream fulcrum { | |
| server 127.0.0.1:5000; | |
| } | |
| server { | |
| listen 443; | |
| server_name <MY_DOMAIN>; | |
| root /home/fulcrum/fulcrum/public; | |
| access_log /var/log/nginx/fulcrum.access.log; | |
| error_log /var/log/nginx/fulcrum.error.log; | |
| proxy_connect_timeout 60; | |
| proxy_read_timeout 60; | |
| proxy_send_timeout 60; | |
| location / { | |
| if (-f $request_filename) { | |
| break; | |
| } | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_pass http://fulcrum; | |
| # for auth | |
| satisfy any; | |
| allow <ALLOW_IP>; | |
| deny all; | |
| auth_basic "Auth"; | |
| auth_basic_user_file htpasswd; | |
| } | |
| location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ { | |
| expires 1y; | |
| } | |
| # for ssl settings | |
| ssl on; | |
| ssl_certificate ssl/cert.pem; | |
| ssl_certificate_key ssl/key.pem; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment