forked from unimatrix/web
Fresh production baseline [skip ci]
This commit is contained in:
commit
0a11a18274
1 changed files with 229644 additions and 0 deletions
44
website/ops/oscommerce/oscommerce-https.conf
Normal file
44
website/ops/oscommerce/oscommerce-https.conf
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
server {
|
||||
listen 443 ssl; listen [::]:443 ssl; http2 on;
|
||||
server_name shop.dunerealms.com;
|
||||
ssl_certificate /etc/letsencrypt/live/dunerealms-shop/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/dunerealms-shop/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
root /home/dunerealms/apps/oscommerce;
|
||||
index index.php;
|
||||
client_max_body_size 20m;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||||
add_header Strict-Transport-Security "max-age=15552000" always;
|
||||
add_header Content-Security-Policy "frame-ancestors 'self' https://www.dunerealms.com https://dunerealms.com https://cp.dunerealms.com" always;
|
||||
location = / { root /var/www/dunerealms-shop-portal; try_files /index.html =404; default_type text/html; }
|
||||
location = /catalog { return 308 /catalog/; }
|
||||
location = /catalog/index.php {
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /home/dunerealms/apps/oscommerce/index.php;
|
||||
fastcgi_param SCRIPT_NAME /catalog/index.php;
|
||||
fastcgi_param HTTPS on;
|
||||
fastcgi_pass unix:/run/php/dunerealms-oscommerce.sock;
|
||||
fastcgi_read_timeout 100s;
|
||||
}
|
||||
location ~ /(?:\.|lib/|sql/|includes/|install/|documents/|download/) { return 404; }
|
||||
location ~ ^/(?:index|admin/index|dune-login)\.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTPS on;
|
||||
fastcgi_pass unix:/run/php/dunerealms-oscommerce.sock;
|
||||
fastcgi_read_timeout 100s;
|
||||
}
|
||||
location ~ \.(?:php|sql|ini|log|bak|conf)$ { return 404; }
|
||||
location /catalog/ { alias /home/dunerealms/apps/oscommerce/; try_files $uri $uri/ @oscommerce_front; }
|
||||
location @oscommerce_front {
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /home/dunerealms/apps/oscommerce/index.php;
|
||||
fastcgi_param SCRIPT_NAME /catalog/index.php;
|
||||
fastcgi_param HTTPS on;
|
||||
fastcgi_pass unix:/run/php/dunerealms-oscommerce.sock;
|
||||
fastcgi_read_timeout 100s;
|
||||
}
|
||||
location /admin/ { try_files $uri $uri/ /admin/index.php?$query_string; }
|
||||
location / { try_files $uri $uri/ /index.php?$query_string; }
|
||||
}
|
||||
Loading…
Reference in a new issue

Staff