server {
    listen 80;
    server_name openclaw.eatsun.com.cn;

    include /etc/nginx/snippets/letsencrypt.conf;

    location / {
        # Uncomment the following line to force HTTPS
        return 301 https://$host$request_uri;

        # If you want to allow HTTP access, comment out the return 301 line above and uncomment the location block below
        # include /etc/nginx/snippets/websocket.conf;
        # proxy_pass http://172.18.188.189:15888;
    }
}

server {
    listen 443 ssl;
    server_name openclaw.eatsun.com.cn;

    ssl_certificate /etc/letsencrypt/live/openclaw.eatsun.com.cn/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/openclaw.eatsun.com.cn/privkey.pem;
    
    include /etc/nginx/snippets/ssl-params.conf;

    location / {
        include /etc/nginx/snippets/websocket.conf;
        proxy_pass http://172.18.188.189:18789;
    }
}
