Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name example.ca;
- return 301 https://$server_name$request_uri;
- }
- server {
- server_name example.ca;
- listen *:443;
- access_log /srv/www/example.ca/logs/example.ca.access.log;
- error_log /srv/www/example.ca/logs/example.ca.error.log;
- ssl on;
- ssl_certificate /etc/ssl/example.ca.cer;
- ssl_certificate_key /etc/ssl/example.ca.key;
- ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
- root /srv/www/example.ca/current/web;
- index index.php;
- sendfile off;
- client_max_body_size 12M;
- location / {
- index index.php index.html index.htm;
- try_files $uri $uri/ /index.php?$args;
- }
- location ~* \.(gif|jpg|jpeg|png|css|js)$ {
- expires max;
- }
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_index index.php;
- fastcgi_pass unix:/var/run/php-fpm/example.ca.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- # Deny access to any files with a .php extension in the uploads directory
- location ~* /(?:uploads|files)/.*\.php$ {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement