47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name tehnobox.shop www.tehnobox.shop;
|
|
root /var/www/tehnobox/public;
|
|
index index.php;
|
|
|
|
charset utf-8;
|
|
client_max_body_size 20m;
|
|
|
|
add_header X-Frame-Options "SAMEORIGIN";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
default_type "text/plain";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
error_page 404 /index.php;
|
|
|
|
location ~ \.php$ {
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
|
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
|
|
fastcgi_read_timeout 60s;
|
|
}
|
|
|
|
location ~ /\.(?!well-known).* {
|
|
deny all;
|
|
}
|
|
}
|