Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user nginx;
- worker_processes 1;
- error_log /var/log/nginx/error.log warn;
- pid /var/run/nginx.pid;
- events {
- worker_connections 1024;
- }
- http {
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- access_log /var/log/nginx/access.log;
- sendfile on;
- tcp_nopush on;
- keepalive_timeout 65;
- gzip on;
- gzip_min_length 1100;
- gzip_disable "MSIE [1-6]\.(?!.*SV1)";
- gzip_proxied any;
- gzip_comp_level 4;
- gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
- gzip_vary on;
- server {
- listen 80;
- listen 443 ssl spdy;
- server_name .dev;
- ssl_certificate /etc/ssl/certs/lemb.tk.pem;
- ssl_certificate_key /etc/ssl/private/lemb.tk.key;
- spdy_headers_comp 5;
- set $basepath "/www";
- set $domain $host;
- if ($domain ~ "^(.*)\.dev$") {
- set $domain $1;
- }
- set $rootpath "${domain}";
- set $rootpath "${domain}/public_html";
- root $basepath/$rootpath;
- index index.php index.html;
- location / {
- index index.php;
- error_page 404 = @indexphp;
- }
- location @indexphp {
- rewrite ^(.*)$ /index.php$1;
- }
- location ~ ^(.+\.php)(?:/.+)?$ {
- expires off;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- include fastcgi_params;
- }
- try_files $uri $uri/ /index.php?$args;
- charset utf-8;
- location ~ /\.ht {
- deny all;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement