SHOW:
|
|
- or go back to the newest paste.
1 | server { | |
2 | listen 80; | |
3 | server_name www.getm15.com; | |
4 | return 301 $scheme://getm15.com$request_uri; | |
5 | } | |
6 | ||
7 | server { | |
8 | listen 80; | |
9 | root /home/rails/public; | |
10 | server_name _; | |
11 | index index.htm index.html; | |
12 | ||
13 | location / { | |
14 | try_files $uri/index.html $uri.html $uri @app; | |
15 | } | |
16 | ||
17 | # location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bm$ | |
18 | location ~* ^.+\.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mp3|fl$ | |
19 | try_files $uri @app; | |
20 | } | |
21 | ||
22 | location @app { | |
23 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
24 | proxy_set_header Host $http_host; | |
25 | - | proxy_redirect off; |
25 | + | proxy_redirect off; |
26 | proxy_pass http://app_server; | |
27 | } | |
28 | ||
29 | } |