Last active
September 7, 2021 17:59
-
-
Save luissquall/d29c1c70011d4a1cf032895e97090a4b 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 [::]:443 ssl; | |
server_name {{ domain }}; | |
client_max_body_size 10M; | |
root {{ webroot }}; | |
index index.php index.html index.htm; | |
access_log /var/log/nginx/{{ domain }}-ssl.access.log; | |
error_log /var/log/nginx/{{ domain }}-ssl.error.log; | |
ssl on; | |
ssl_certificate {{ ssl_certificate }}; | |
ssl_certificate_key {{ ssl_certificate_key }}; | |
location / { | |
try_files $uri $uri/ /index.php?$args; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_read_timeout 180s; | |
} | |
# Deny access to .htaccess files, if Apache's document root | |
# concurs with nginx's one | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment