---
# System prepended metadata

title: 'server {    listen [::]:443 s'
tags: [DevOps]

---

```
server {
    listen [::]:443 ssl; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/junlin5525.dev/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/junlin5525.dev/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_name junlin5525.dev

    if ($host = junlin5525.dev){
        return 301 https://$host$request_uri;
    }

    # 添加您的现有配置内容在这里，例如：
    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

    location /api/ {
        proxy_pass http://localhost:8000;
    }

    location /static/ {
        alias /path/to/your/static/files;
    }

 location /media/ {
        alias /path/to/your/media/files;
    }

    location /favicon.ico {
        alias /path/to/your/favicon.ico;
    }
}

server{
    listen 80;
    listen [::]:80;
    server_name junlin5525.dev;
    return 404;
}
                          
```


可以進到[frontend](https://github.com/JunLin525/SEA_SHOP/tree/main/frontend/seashop)資料夾下輸入下列指令