Skip to content

Instantly share code, notes, and snippets.

@jyc
Created December 24, 2012 23:59
Show Gist options
  • Select an option

  • Save jyc/4371086 to your computer and use it in GitHub Desktop.

Select an option

Save jyc/4371086 to your computer and use it in GitHub Desktop.
server {
listen 80;
# listen 443 ssl;
server_name _;
# ssl_certificate /etc/nginx/certs/default.pem;
# ssl_certificate_key /etc/nginx/certs/default.key;
client_max_body_size 15M;
client_body_buffer_size 128k;
root /opt/www/nginx/default;
# if ( $scheme = http )
# {
# rewrite ^ https://$server_name$request_uri? permanent;
# }
location / {
index index.html index.htm index.php;
}
# location /front-controller {
# index index.php;
# try_files $uri $uri/ /front-controller/index.php;
# }
location ~ /\. { deny all; }
location ~ \.php$ {
try_files $uri $uri/ =404;
include fastcgi_params;
fastcgi_pass unix:/var/run/fpm-php5.4.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param HTTPS on;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment