Skip to content

Commit a1896fe

Browse files
committed
Enable SSL and add www redirect for convert2doc.com nginx config
1 parent e4524c7 commit a1896fe

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ jobs:
8888
# Run deploy script with migrations
8989
./bin/deploy-with-migrations.sh
9090
91+
# Explicitly copy the .env file to the remote server
92+
echo "Copying .env file to remote server..."
93+
scp -P 2048 .env [email protected]:$DEPLOY_REMOTE_DIR/.env
94+
9195
# Create a timestamp file to verify deployment
9296
echo "Creating timestamp file to verify deployment..."
9397
TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")

etc/convert2doc.com.conf

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ server {
99
return 301 https://convert2doc.com$request_uri;
1010
}
1111

12+
server {
13+
listen [::]:443 ssl http2;
14+
listen 443 ssl http2;
15+
server_name www.convert2doc.com;
16+
return 301 https://convert2doc.com$request_uri;
17+
}
18+
1219
server {
1320
server_name convert2doc.com;
1421
#index index.html;
@@ -20,14 +27,13 @@ server {
2027
expires -1;
2128
etag off;
2229

23-
# listen [::]:443 ssl http2; #managed by Certbot
24-
# listen 443 ssl http2; #managed by Certbot
25-
# ssl_certificate /etc/letsencrypt/live/convert2doc.com/fullchain.pem; #managed by Certbot
26-
# ssl_certificate_key /etc/letsencrypt/live/convert2doc.com/privkey.pem; # managed by Certbot
27-
# include /etc/letsencrypt/options-ssl-nginx.conf; #managed by Certbot
28-
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; #managed by Certbot
29-
# ssl_protocols TLSv1.2;
30-
30+
listen [::]:443 ssl http2; #managed by Certbot
31+
listen 443 ssl http2; #managed by Certbot
32+
ssl_certificate /etc/letsencrypt/live/convert2doc.com/fullchain.pem; #managed by Certbot
33+
ssl_certificate_key /etc/letsencrypt/live/convert2doc.com/privkey.pem; # managed by Certbot
34+
include /etc/letsencrypt/options-ssl-nginx.conf; #managed by Certbot
35+
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; #managed by Certbot
36+
ssl_protocols TLSv1.2;
3137

3238
#try_files $uri $uri/ /index.html;
3339
client_max_body_size 1000M;

0 commit comments

Comments
 (0)