Created
March 2, 2017 00:42
-
-
Save hasangilak/d69b712613abd1583abfaf775ed26d10 to your computer and use it in GitHub Desktop.
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 443 ssl; | |
listen 80; | |
server_name filan.com www.filan.com; | |
root /var/www/samsung/public; | |
index index.php index.html index.htm; | |
if ($http_cf_visitor ~ '{"scheme":"http"}') { | |
return 301 https://$server_name$request_uri; | |
} | |
ssl_certificate /etc/letsencrypt/live/filan.com/fullchain1.pem; | |
ssl_certificate_key /etc/letsencrypt/live/filan.com/privkey1.pem; | |
location / { | |
try_files $uri /index.php$is_args$args; | |
} | |
location ~ \.php$ { | |
try_files $uri /index.php =404; | |
fastcgi_pass php-upstream; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~* (?:^|/)\. { | |
deny all; | |
} | |
location ^~ /.well-known { | |
allow all; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment