Files
zira-etc/nginx/conf.d/_zira.go.ro.conf
2022-04-06 12:30:25 +03:00

45 lines
1.2 KiB
Plaintext

server {
listen 192.168.1.2:80;
server_name zira.go.ro;
charset utf-8;
root /var/www/html/vhosts/club3d.ro/;
index index.php index.html index.htm;
access_log /var/log/nginx/club3d.ro.access.log;
error_log /var/log/nginx/club3d.ro.error.log;
location ~* \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location /madalin {
autoindex on;
}
# gzip should not be used with SSL
gzip off;
location /sgwi {
auth_basic "Private Zone";
auth_basic_user_file /etc/nginx/.htpasswd;
}
listen 192.168.1.2:443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/zira.go.ro/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zira.go.ro/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
### redirect
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}