80 lines
2.8 KiB
Django/Jinja
80 lines
2.8 KiB
Django/Jinja
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
http2 on;
|
|
server_name www.tinycommerce.com;
|
|
set $maintenance_site_key "tinycommerce.com";
|
|
set $base /var/www/html/tinycommerce.com;
|
|
root /var/www/html/tinycommerce.com/public;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/tinycommerce.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/tinycommerce.com/privkey.pem;
|
|
ssl_trusted_certificate /etc/letsencrypt/live/tinycommerce.com/chain.pem;
|
|
|
|
include snippets/cloudflare-realip.conf;
|
|
include snippets/security.conf;
|
|
include snippets/maintenance-mode.conf;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
index index.php;
|
|
|
|
location / {
|
|
if (-f /etc/nginx/maintenance/enabled) {
|
|
return 503;
|
|
}
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
include snippets/general.conf;
|
|
include snippets/wordpress.conf;
|
|
client_max_body_size 0;
|
|
|
|
|
|
location ~ \.php$ {
|
|
if (-f /etc/nginx/maintenance/enabled) {
|
|
return 503;
|
|
}
|
|
fastcgi_pass unix:/var/run/php/php-wordpress.sock;
|
|
include snippets/php-wordpress-fastcgi.conf;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
http2 on;
|
|
server_name tinycommerce.com;
|
|
set $maintenance_site_key "tinycommerce.com";
|
|
|
|
ssl_certificate /etc/letsencrypt/live/tinycommerce.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/tinycommerce.com/privkey.pem;
|
|
ssl_trusted_certificate /etc/letsencrypt/live/tinycommerce.com/chain.pem;
|
|
include snippets/cloudflare-realip.conf;
|
|
include snippets/maintenance-mode.conf;
|
|
|
|
location / {
|
|
if (-f /etc/nginx/maintenance/enabled) {
|
|
return 503;
|
|
}
|
|
return 301 https://www.tinycommerce.com$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name tinycommerce.com www.tinycommerce.com;
|
|
set $maintenance_site_key "tinycommerce.com";
|
|
include snippets/letsencrypt.conf;
|
|
include snippets/cloudflare-realip.conf;
|
|
include snippets/maintenance-mode.conf;
|
|
|
|
location / {
|
|
if (-f /etc/nginx/maintenance/enabled) {
|
|
return 503;
|
|
}
|
|
return 301 https://www.tinycommerce.com$request_uri;
|
|
}
|
|
}
|