34 lines
792 B
Plaintext
34 lines
792 B
Plaintext
server {
|
|
listen [::1]:42443 ssl http2;
|
|
listen 127.0.0.1:42443 ssl http2;
|
|
server_name niver.test;
|
|
|
|
root /srv/niver/core/public;
|
|
index index.php index.html index.htm;
|
|
try_files $uri $uri/ @extensionless-php;
|
|
|
|
include inc/tls.conf;
|
|
include inc/errors.conf;
|
|
|
|
more_set_headers "Content-Security-Policy : default-src 'none'; style-src 'self'; frame-ancestors 'none'; form-action 'self';";
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass unix:/run/php-fpm/niver.sock;
|
|
#fastcgi_index index.php;
|
|
include inc/fastcgi.conf;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location @extensionless-php {
|
|
rewrite ^(.*)$ $1.php last;
|
|
}
|
|
|
|
location /docs {
|
|
alias /srv/niver/docs;
|
|
}
|
|
|
|
ssl_certificate /etc/ssl/certs/niver.crt;
|
|
ssl_certificate_key /etc/ssl/private/niver.key;
|
|
}
|