Permalink
Browse files

Add nginx config file

  • Loading branch information...
1 parent 8910c56 commit 06e90c77c09bddb271429ae91b71c2d310c4ace9 @afgane committed May 1, 2012
Showing with 90 additions and 0 deletions.
  1. +90 −0 ghem/nginx.conf
View
@@ -0,0 +1,90 @@
+worker_processes 2;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+ sendfile on;
+ keepalive_timeout 65;
+
+ gzip on;
+ gzip_http_version 1.1;
+ gzip_vary on;
+ gzip_comp_level 4;
+ gzip_proxied any;
+ gzip_types text/plain text/css application/x-javascript text/xml application/xml text/javascript application/json;
+ gzip_buffers 16 8k;
+ gzip_disable "MSIE [1-6].(?!.*SV1)";
+
+ upstream ghem_app {
+ server localhost:8080;
+ }
+
+ upstream cm_app {
+ server localhost:42284;
+ }
+
+ server {
+ listen 80;
+ client_max_body_size 2048m;
+ server_name localhost;
+ proxy_read_timeout 600;
+
+ location /cloud {
+ proxy_pass http://cm_app;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ error_page 502 /errdoc/gc2_502.html;
+ }
+
+ location /cloud/static {
+ alias /mnt/cm/static;
+ expires 24h;
+ }
+
+ location /cloud/static/style {
+ alias /mnt/cm/static/style;
+ expires 24h;
+ }
+
+ location /cloud/static/scripts {
+ alias /mnt/cm/static/scripts;
+ expires 24h;
+ }
+
+ location / {
+ proxy_pass http://ghem_app;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ }
+
+ location /static {
+ alias /home/ubuntu/weather/ghem/ghem/ghem/static;
+ expires 24h;
+ }
+
+ location /static/images {
+ alias /home/ubuntu/weather/ghem/ghem/ghem/static/images;
+ expires 24h;
+ }
+
+ location /static/css {
+ alias /home/ubuntu/weather/ghem/ghem/ghem/static/css;
+ expires 24h;
+ }
+
+ location /favicon.ico {
+ alias /home/ubuntu/weather/ghem/ghem/ghem/static/favicon.ico;
+ }
+
+ error_page 502 /errdoc/502.html;
+ location /errdoc {
+ root html;
+ }
+
+ }
+
+}

0 comments on commit 06e90c7

Please sign in to comment.