From 17abf9fc653268b4d0d549f1479ee304f5a3b7a4 Mon Sep 17 00:00:00 2001 From: a-ill Date: Sat, 24 Jun 2023 17:11:29 +0300 Subject: [PATCH] Update --- Server/bin/server.sh | 2 +- Server/config/libsoc.org.conf | 76 +++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 Server/config/libsoc.org.conf diff --git a/Server/bin/server.sh b/Server/bin/server.sh index 828e9ee..2b3695d 100644 --- a/Server/bin/server.sh +++ b/Server/bin/server.sh @@ -1,2 +1,2 @@ export GENIE_ENV=prod -julia --color=yes --depwarn=no --project=@. -q -i -- "..\startup.jl" -s=true %* \ No newline at end of file +julia "startup.jl" \ No newline at end of file diff --git a/Server/config/libsoc.org.conf b/Server/config/libsoc.org.conf new file mode 100644 index 0000000..bcef860 --- /dev/null +++ b/Server/config/libsoc.org.conf @@ -0,0 +1,76 @@ +server { + + server_name www.libsoc.org; + + root /home/server/libsoc/Server/public/; + + add_header alt-svc 'h3=":443"; ma=2592000, h3-23=":443"; ma=86400, h3-29=":443"; ma=2592000'; + add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; + + location ~* \.(?:ico|gif|jpe?g|png|svg)$ { + expires 1d; + add_header Pragma public; + add_header Cache-Control "public"; + } + location ~* \.(?:css|js|json)$ { + expires 1d; + add_header Pragma public; + add_header Cache-Control "public"; + } + location ~* \.(?:woff2|woff|ttf)$ { + expires max; + add_header Pragma public; + add_header Cache-Control "public"; + } + location /js/ {} + location /css {} + location /img/ {} + location /assets/ {} + location /fonts/ {} + location /favicon.ico {} + location /robots.txt {} + location ~ /courses/Space { + return 404; + } + location ~ /loaderio-58f125137ee61345d68285d88016ce2a {} + + location / { + proxy_pass http://127.0.0.1:8001/; + } + + listen 443 http3; + listen 443 ssl http2; + ssl_certificate /etc/letsencrypt/live/libsoc.org/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/libsoc.org/privkey.pem; # managed by Certbot + include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot + + ssl_buffer_size 4k; + ssl_stapling on; + ssl_stapling_verify on; + ssl_trusted_certificate /etc/letsencrypt/live/libsoc.org/fullchain.pem; + + resolver 1.1.1.1 1.0.0.1 valid=300s; + resolver_timeout 5s; +} + +server { + return 301 https://www.libsoc.org$request_uri; + + server_name libsoc.org; + + listen 443 ssl http2; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/libsoc.org/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/libsoc.org/privkey.pem; # managed by Certbot + include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot +} + +server { + return 301 https://www.libsoc.org$request_uri; + + listen 80; + listen [::]:80; + + server_name www.libsoc.org libsoc.org; +}