Created
February 9, 2015 19:08
-
-
Save ties/cffd50a17afca48bfb26 to your computer and use it in GitHub Desktop.
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
| server { | |
| listen 80; | |
| listen [::]:80 ipv6only=on; | |
| server_name [host].dev; | |
| root /Users/[docroot]; | |
| index index.html index.htm; | |
| location / { | |
| # First attempt to serve request as file, then | |
| # as directory, then fall back to displaying a 404. | |
| try_files $uri $uri/ /index.html; | |
| # Uncomment to enable naxsi on this location | |
| # include /etc/nginx/naxsi.rules | |
| } | |
| location /api/ { | |
| proxy_pass http://[url]/api/; | |
| proxy_redirect http://[url]/api/ $scheme://$host/api/; | |
| # HTTP auth? | |
| # proxy_hide_header "WWW-Authenticate"; | |
| # base64.b64encode("username:password".encode("ascii")) | |
| # proxy_set_header Authorization "Basic [base64here]"; | |
| add_header Access-Control-Allow-Origin "*"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment