Created
May 8, 2012 07:11
-
-
Save ashga/2633227 to your computer and use it in GitHub Desktop.
Spree nginx config
This file contains 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
# /etc/nginx/sites-available/default | |
upstream my_site { | |
# fail_timeout=0 means we always retry an upstream even if it failed | |
# to return a good HTTP response (in case the Unicorn master nukes a | |
# single worker for timing out). | |
# for UNIX domain socket setups: | |
server unix:/tmp/my_site.socket fail_timeout=0; | |
} | |
#server { | |
# listen *:80; | |
#server_name sitedemo; | |
#rewrite / $scheme://$request_uri permanent; ## Forcibly prepend a www | |
# rewrite / $scheme://$host$request_uri permanent; | |
# server_name sitedemo; | |
#} | |
server { | |
# if you're running multiple servers, instead of "default" you should | |
# put your main domain name here | |
listen *:80; | |
listen *:443 ssl; | |
#passenger_enabled on; | |
keepalive_timeout 70; | |
#ssl on; | |
ssl_certificate /usr/share/ssl/kings.crt; | |
ssl_certificate_key /usr/share/ssl/kings.key; | |
#server_name sitedemo; | |
root /u/apps/WebPortal/current/public; | |
access_log /var/log/nginx/my_site_access.log; | |
rewrite_log on; | |
location / { | |
#all requests are sent to the UNIX socket | |
proxy_pass http://my_site; | |
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-Proto $scheme; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment