Created
September 2, 2015 08:11
-
-
Save rajivseelam/0b0652cf290fa2d76a29 to your computer and use it in GitHub Desktop.
NGINX DEFAULT
This file contains 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
server { | |
listen 80; | |
server_name ssmi.constrat.in ssmi.constrat.in; | |
root /home/ubuntu/default/crusher/public; | |
index index.html index.htm index.php; | |
charset utf-8; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location = /robots.txt { access_log off; log_not_found off; } | |
access_log off; | |
error_log /var/log/nginx/default-error.log error; | |
error_page 404 /index.php; | |
location ~ \.php$ { | |
fastcgi_param LARAVEL_ENV "rajiv"; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~* .(jpg|jpeg|png|gif|ico|css|js)$ { | |
expires 7d; | |
add_header Pragma public; | |
add_header Cache-Control "public"; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
gzip on; | |
gzip_http_version 1.1; | |
gzip_vary on; | |
gzip_comp_level 6; | |
gzip_proxied any; | |
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml; | |
#it was gzip_buffers 16 8k; | |
gzip_buffers 128 4k; #my pagesize is 4 | |
gzip_disable "MSIE [1-6]\.(?!.*SV1)"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment