Skip to content

Instantly share code, notes, and snippets.

@abackstrom
Created September 14, 2010 20:16
Show Gist options
  • Save abackstrom/579688 to your computer and use it in GitHub Desktop.
Save abackstrom/579688 to your computer and use it in GitHub Desktop.
server {
listen 69.164.216.5:80 default;
root /var/www/mu.sixohthree.com/html;
server_name_in_redirect off;
#fastcgi_cache_valid 200 20m;
#fastcgi_cache_key "$host$request_uri";
#fastcgi_cache mu;
access_log /var/www/mu.sixohthree.com/logs/access_log custom;
error_log /var/www/mu.sixohthree.com/logs/error_log error;
log_subrequest off;
index index.php;
try_files $uri $uri/ /index.php;
location /~adam/ {
alias /home/adam/blog/;
}
location /~ {
return 410;
}
location / {
rewrite ^.*/files/(.*) /wp-includes/ms-files.php?file=$1 last;
}
location /blogs.dir {
internal;
alias /var/www/mu.sixohthree.com/html/wp-content/blogs.dir;
expires 30d;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/mu.sixohthree.com/html/$fastcgi_script_name;
}
}
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
client_body_temp_path /var/lib/nginx/body 1 2;
gzip on;
gzip_buffers 32 8k;
gzip_types application/javascript text/javascript text/css text/xml application/atom+xml application/xml;
gzip_http_version 1.1;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
gzip_static on;
access_log /var/log/nginx/access.log;
fastcgi_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=mu:180m max_size=500m;
log_format custom '$host $remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
client_max_body_size 3M;
ssl_certificate /root/ssl/sixohthree.com.crt;
ssl_certificate_key /root/ssl/sixohthree.com.key;
sendfile on;
#tcp_nopush off;
#tcp_nodelay on;
keepalive_timeout 65;
include /etc/nginx/sites-enabled/*;
}
# vim:ts=4:sw=4:et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment