save
This commit is contained in:
parent
b3dba4542f
commit
0c98334d1c
9 changed files with 151 additions and 0 deletions
31
recipes/nginx/static.erb
Normal file
31
recipes/nginx/static.erb
Normal file
|
@ -0,0 +1,31 @@
|
|||
server {
|
||||
listen 443 ssl;
|
||||
server_name ~^(?<username>[^.]+)\.gurgul\.pro$;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/gurgul.pro/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/gurgul.pro/privkey.pem;
|
||||
|
||||
root /home/$username/website;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
## Optional: handle PHP (if using PHP)
|
||||
#location ~ \.php$ {
|
||||
# include snippets/fastcgi-php.conf;
|
||||
# fastcgi_pass unix:/run/php/php8.1-fpm.sock; # adjust PHP version as needed
|
||||
#}
|
||||
|
||||
location ~* \.(jpg|jpeg|png|gif|ico|css|js|pdf)$ {
|
||||
expires 7d;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name ~^(?<username>[^.]+)\.gurgul\.pro$;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue