From 18f76aedd586ce6954e166630821981596d9d5bb Mon Sep 17 00:00:00 2001 From: Bifeldy Date: Sat, 14 Sep 2024 12:32:02 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=94=20Pindahan=20~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/alt-site/nginx.conf | 50 +++++++++++++++++++++ nginx.conf => projects/main-site/nginx.conf | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 projects/alt-site/nginx.conf rename nginx.conf => projects/main-site/nginx.conf (92%) diff --git a/projects/alt-site/nginx.conf b/projects/alt-site/nginx.conf new file mode 100644 index 00000000..219f0c96 --- /dev/null +++ b/projects/alt-site/nginx.conf @@ -0,0 +1,50 @@ +# +# Virtual Host configuration +# FanShare +# +# ln -s /home/bifeldy/www/fansubid/projects/main-site/nginx.conf /home/bifeldy/www/fanshare/nginx.conf +# sudo ln -s /home/bifeldy/www/fanshare/nginx.conf /home/bifeldy/_configs/_nginx/fanshare +# + +server { + + listen 80; + listen [::]:80; + + server_name fanshare.id www.fanshare.id; + + if ($host = fanshare.id) { + return 301 $scheme://www.$host$request_uri; + } + return 301 https://$host$request_uri; + +} + +server { + + listen 443 ssl; + listen [::]:443 ssl; + + server_name fanshare.id; + + ssl_certificate /etc/letsencrypt/live/fanshare.id/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/fanshare.id/privkey.pem; + + return 301 $scheme://www.$host$request_uri; + +} + +server { + + listen 443 ssl; + listen [::]:443 ssl; + + server_name www.fanshare.id; + + ssl_certificate /etc/letsencrypt/live/fanshare.id/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/fanshare.id/privkey.pem; + + root /home/bifeldy/www/fansubid/dist/alt-site; + index index.html; + +} \ No newline at end of file diff --git a/nginx.conf b/projects/main-site/nginx.conf similarity index 92% rename from nginx.conf rename to projects/main-site/nginx.conf index 8be36b13..839bf4d5 100644 --- a/nginx.conf +++ b/projects/main-site/nginx.conf @@ -2,7 +2,7 @@ # Virtual Host configuration # FansubID - Database Fansub Indonesia - NodeJS # -# sudo ln -s /home/bifeldy/www/fansubid/nginx.conf /home/bifeldy/_configs/_nginx/fansubid +# sudo ln -s /home/bifeldy/www/fansubid/projects/main-site/nginx.conf /home/bifeldy/_configs/_nginx/fansubid # ln -s /home/bifeldy/www/fansubid/projects/main-site/src/assets /home/bifeldy/www/fansubid/dist/main-site/browser/assets #