1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 03:14:04 +00:00

Begin work on HTTPS

This commit is contained in:
Samuel Štancl 2019-02-01 21:36:48 +01:00
parent 349832c64b
commit aa46cb8e35
10 changed files with 148 additions and 0 deletions

View file

@ -0,0 +1,31 @@
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
add_header Strict-Transport-Security "max-age=31536000" always; # managed by Certbot
access_log /var/log/nginx/tenancy/access.log;
error_log /var/log/nginx/tenancy/error.log;
rewrite_log on;
root /var/www/laravel/tenancy/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Remove trailing slash to please the routing system.
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
location ~* \.php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}