Skip to content

Commit

Permalink
Update nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
manti-by committed Feb 22, 2024
1 parent cc92f19 commit 09b8538
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions config/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
server {
listen 80;
http2 on;

server_name semkov-gorodok.by www.semkov-gorodok.by;
return 301 https://semkov-gorodok.by$request_uri;
}

server {
listen 443 ssl;
http2 on;

server_name www.semkov-gorodok.by;
<<<<<<< Updated upstream
return 301 https://semkov-gorodok.by$request_uri;
=======
>>>>>>> Stashed changes

include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

<<<<<<< Updated upstream
ssl_certificate /etc/letsencrypt/live/semkov-gorodok.by/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/semkov-gorodok.by/privkey.pem;
=======
ssl_certificate /etc/letsencrypt/live/semkov-gorodok.by/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/semkov-gorodok.by/privkey.pem; # managed by Certbot

return 301 https://semkov-gorodok.by$request_uri;
>>>>>>> Stashed changes
}

server {
listen 443 quic reuseport;
listen 443 ssl;

http2 on;
server_name semkov-gorodok.by;

Expand All @@ -39,7 +53,7 @@ server {
add_header Cache-Control 'public, must-revalidate, proxy-revalidate';
}

location /api/ {
location /(api|dashboard)/ {
expires max;
add_header Pragma 'public';
add_header Cache-Control 'public, must-revalidate, proxy-revalidate';
Expand All @@ -48,14 +62,6 @@ server {
include /home/manti/www/semkov/config/proxy-params.conf;
}

location /dashboard/ {
expires off;
add_header Cache-Control 'private';

proxy_pass http://127.0.0.1:8898;
include /home/manti/www/semkov/config/proxy-params.conf;
}

location /static/ {
alias /mnt/nostromo/www/semkov/static/;

Expand Down Expand Up @@ -84,6 +90,7 @@ server {
expires 7d;
add_header Pragma 'public';
add_header Cache-Control 'public, must-revalidate, proxy-revalidate';
add_header Alt-Svc 'h3=":$server_port"; ma=86400';

add_header X-XSS-Protection '1; mode=block';
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
Expand All @@ -95,7 +102,11 @@ server {

include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
<<<<<<< Updated upstream

=======

>>>>>>> Stashed changes
ssl_certificate /etc/letsencrypt/live/semkov-gorodok.by/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/semkov-gorodok.by/privkey.pem;
}

0 comments on commit 09b8538

Please sign in to comment.