Last active
January 27, 2017 08:34
-
-
Save hasangilak/d202dd8fbd80aca00dcb001266823dbd 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
# if using cloudeflare you should activate "full" ssl not "flexible" at all | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name folan.xyz; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl default_server; | |
server_name folan.xyz; | |
root "/var/www/folan.xyz/public/"; | |
index index.html index.htm index.php; | |
charset utf-8; | |
ssl_certificate /etc/letsencrypt/live/folan.xyz/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/folan.xyz/privkey.pem; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location = /robots.txt { access_log off; log_not_found off; } | |
access_log off; | |
error_log /var/log/nginx/folan.xyz-error.log error; | |
sendfile off; | |
client_max_body_size 100m; | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/run/php/php7.0-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
location ~ /.well-known { | |
allow all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment