Skip to content

Commit

Permalink
remove 443
Browse files Browse the repository at this point in the history
  • Loading branch information
mrzaizai2k committed Dec 10, 2024
1 parent a431aa6 commit 3c8dbf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/set_up_EC2.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Because each instance running will have a different IP address, elastic IP help
-
```
./init-letsencrypt.sh
./scripts/init-letsencrypt.sh
docker compose up -d
```
Then check if cert is downloaded in nginx docker
Expand Down
37 changes: 1 addition & 36 deletions nginx/prod/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,5 @@ http {
}

# HTTPS server
server {
listen 443 ssl;
server_name ${SERVER_IP};

# SSL configuration
ssl_certificate /etc/letsencrypt/live/${SERVER_IP}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${SERVER_IP}/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/${SERVER_IP}/chain.pem;

# Frontend
location / {
proxy_pass http://jwt-frontend:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

# Backend API
location /api/ {
proxy_pass http://fastapi-app:8149/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
}

# MongoDB
location /mongo/ {
proxy_pass http://mongodb:27017/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}

}

0 comments on commit 3c8dbf9

Please sign in to comment.