Skip to content

Instantly share code, notes, and snippets.

@robintemme
Last active August 29, 2015 14:08
Show Gist options
  • Save robintemme/b37e2db721c0963148b8 to your computer and use it in GitHub Desktop.
Save robintemme/b37e2db721c0963148b8 to your computer and use it in GitHub Desktop.
Working nginx.conf
worker_processes 1;
error_log /var/log/nginx/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
server_names_hash_bucket_size 64;
server {
client_max_body_size 20M;
listen 80;
server_name localhost;
charset utf-8;
autoindex on;
access_log off;
root /var/www/;
index index.php index.html;
include php.conf;
include static.conf;
}
}
location ~ \.php$ {
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_intercept_errors on;
}
location ~* \.(?:jpg|jpeg|gif|css|png|js|ico)$ {
access_log off;
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment