server/srcs/nginx

26 lines
457 B
Plaintext
Raw Permalink Normal View History

2023-03-01 04:35:27 +01:00
server {
listen 443 ssl default_server;
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
root /var/www;
index index.php index.html index.htm;
server_name localhost;
location / {
autoindex off;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
}
server {
listen 80;
return 301 https://$host$request_uri;
}