Created
October 29, 2008 21:17
-
-
Save kastner/20831 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| user www-data www-data; | |
| worker_processes 4; | |
| events { | |
| worker_connections 1024; | |
| use epoll; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| log_format main '$remote_addr - $remote_user [$time_local] $request ' | |
| '"$status" $body_bytes_sent "$http_referer" ' | |
| '"$http_user_agent" "$http_x_forwarded_for"'; | |
| sendfile on; | |
| tcp_nopush on; | |
| tcp_nodelay off; | |
| #keepalive_timeout 0; | |
| keepalive_timeout 5; | |
| gzip on; | |
| gzip_comp_level 2; | |
| gzip_proxied any; | |
| gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
| server { | |
| listen 80; | |
| server_name tv.winelibrary.com localhost 65.125.57.202; | |
| access_log /usr/local/nginx/logs/wltv.access.log main; | |
| error_log /usr/local/nginx/logs/wltv.error.log notice; | |
| if ($http_user_agent !~ FeedBurner) { | |
| rewrite ^/feed/? http://feeds.feedburner.com/WinelibraryTv last; | |
| rewrite ^/(feed|rdf|rss|rss2|atom)/? http://feeds.feedburner.com/WinelibraryTv last; | |
| } | |
| rewrite ^/video/(\d+)/?$ /episode_video.php?episode=$1; | |
| rewrite ^/episodes/s3/(.*)$ http://wltv.s3.amazonaws.com/$1 last; | |
| location / { | |
| root /var/www/wltv; | |
| index index.php index.html index.htm; | |
| if (!-e $request_filename) { | |
| rewrite ^(.+)$ /index.php?q=$1 last; | |
| } | |
| } | |
| location ~ \.php$ { | |
| fastcgi_pass 127.0.0.1:9000; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME /var/www/wltv$fastcgi_script_name; | |
| include fastcgi_params; | |
| } | |
| location ~ /\.ht { | |
| deny all; | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment