Last active
August 29, 2015 14:08
-
-
Save robintemme/b37e2db721c0963148b8 to your computer and use it in GitHub Desktop.
Working nginx.conf
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
| 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; | |
| } | |
| } |
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
| location ~ \.php$ { | |
| include fastcgi.conf; | |
| fastcgi_pass 127.0.0.1:9000; | |
| fastcgi_index index.php; | |
| fastcgi_intercept_errors on; | |
| } |
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
| 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