Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/discourse/files/intraforum.adblockplus.org

Issue 9377123: Set up proper FastCGI environment for Discourse and use nginx (Closed)
Patch Set: Converted init_discourse script to Python Created Feb. 18, 2013, 2:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 server {
2 listen [::]:80;
3 server_name intraforum.adblockplus.org;
4 location / {
5 rewrite (.*) https://intraforum.adblockplus.org$1 permanent;
6 }
7 }
8 server {
9 listen [::]:443 ssl;
10 server_name intraforum.adblockplus.org;
11 ssl_certificate sites-available/adblockplus.org_sslcert.pem;
12 ssl_certificate_key sites-available/adblockplus.org_sslcert.key;
13
14 gzip on;
15 gzip_min_length 1000;
16 gzip_types application/json text/css application/x-javascript;
17
18 sendfile on;
19 keepalive_timeout 65;
20
21 location / {
22 root /opt/discourse/public;
23
24 location ~ ^/t\/[0-9]+\/[0-9]+\/avatar {
25 expires 1d;
26 add_header Cache-Control public;
27 add_header ETag "";
28 }
29
30 location ~ ^/assets/ {
31 expires 1y;
32 add_header Cache-Control public;
33 add_header ETag "";
34 break;
35 }
36
37 # If the file exists as a static file serve it directly without
38 # running all the other rewite tests on it
39 if (-f $request_filename) {
40 break;
41 }
42
43 include /etc/nginx/fastcgi_params;
44 if (!-f $request_filename) {
45 fastcgi_pass unix:/tmp/discourse-fastcgi.sock;
46 break;
47 }
48 }
49 }
OLDNEW

Powered by Google App Engine
This is Rietveld