Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- server_name example.com www.example.com;
- return 301 https://$server_name$request_uri;
- server_tokens off;
- }
- server {
- listen 443 ssl default_server;
- listen [::]:443 ssl default_server;
- autoindex on;
- server_tokens off;
- server_name example.com www.example.com;
- ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
- root /data/example.com/www;
- index index.php index.html index.htm;
- error_page 404 /404.html;
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /data/example.com/www;
- }
- # Error & Access logs
- error_log /data/example.com/logs/error.log error;
- access_log /data/example.com/logs/access.log;
- location / {
- index index.php index.html;
- }
- location ~ /.well-known {
- allow all;
- }
- location ~ [^/].php(/|$) {
- 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;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement