Permalink
Browse files

adding documentation

  • Loading branch information...
anomalizer committed Dec 26, 2010
1 parent 7e260af commit ca7c13945c5d19c8aa17f64f0dfd72ffc03e3e41
Showing with 153 additions and 0 deletions.
  1. +153 −0 nginx_conf_fragment.txt
View
@@ -0,0 +1,153 @@
+
+#user nobody;
+worker_processes 1;
+
+#error_log logs/error.log;
+#error_log logs/error.log notice;
+#error_log logs/error.log debug_http;
+
+#pid logs/nginx.pid;
+
+
+events {
+ worker_connections 1024;
+}
+
+
+http {
+
+ upstream ussss
+ {
+ server 127.0.0.1:80 max_fails=5 fail_timeout=1;
+ server 127.0.0.1:801 max_fails=5 backup fail_timeout=1;
+ }
+
+ upstream w2
+ {
+ server 127.0.0.1:80 weight=1 max_fails=2 fail_timeout=60;
+ server 127.0.0.1:801 weight=100 max_fails=2 fail_timeout=60;
+ }
+
+ include mime.types;
+ default_type application/octet-stream;
+
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ 'UP:($upstream_status) ($upstream_response_time) ($upstream_addr)'
+ '$status $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+
+ access_log logs/access.log main;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ #keepalive_timeout 0;
+ keepalive_timeout 65;
+
+ #gzip on;
+
+ server {
+ listen 8081;
+ server_name localhost;
+
+ #charset koi8-r;
+
+ #access_log logs/host.access.log main;
+
+ location / {
+ proxy_pass http://ussss;
+ proxy_connect_timeout 2;
+ proxy_read_timeout 2;
+ }
+
+ location /autodocs {
+ proxy_pass http://w2;
+ }
+
+ #error_page 404 /404.html;
+
+ # redirect server error pages to the static page /50x.html
+ #
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
+
+ # proxy the PHP scripts to Apache listening on 127.0.0.1:80
+ #
+ #location ~ \.php$ {
+ # proxy_pass http://127.0.0.1;
+ #}
+
+ # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
+ #
+ #location ~ \.php$ {
+ # root html;
+ # fastcgi_pass 127.0.0.1:9000;
+ # fastcgi_index index.php;
+ # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
+ # include fastcgi_params;
+ #}
+
+ # deny access to .htaccess files, if Apache's document root
+ # concurs with nginx's one
+ #
+ #location ~ /\.ht {
+ # deny all;
+ #}
+ location /wireframes {
+ proxy_pass http://localhost:8000;
+ }
+
+ location /advertiser {
+ proxy_pass http://localhost:8000;
+ }
+
+ location ~ /adv(css|js|images)
+ {
+ root /home/arvindj/src/people/anomalizer/dj-m3/inmobi_ui/media-ui;
+ }
+ }
+
+
+ # another virtual host using mix of IP-, name-, and port-based configuration
+ #
+ server {
+ listen 8000;
+
+ location / {
+ proxy_pass http://hw.anomalizer.s3.amazonaws.com;
+
+ aws_access_key AKIAJW3RHYEFQATCPBOQ;
+ aws_secret_key 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;
+ s3_bucket hw.anomalizer;
+
+ proxy_set_header Authorization $s3_auth_token;
+ proxy_set_header x-amz-date $aws_date;
+ }
+ }
+
+
+ # HTTPS server
+ #
+ #server {
+ # listen 443;
+ # server_name localhost;
+
+ # ssl on;
+ # ssl_certificate cert.pem;
+ # ssl_certificate_key cert.key;
+
+ # ssl_session_timeout 5m;
+
+ # ssl_protocols SSLv2 SSLv3 TLSv1;
+ # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
+ # ssl_prefer_server_ciphers on;
+
+ # location / {
+ # root html;
+ # index index.html index.htm;
+ # }
+ #}
+
+}

0 comments on commit ca7c139

Please sign in to comment.