server { server_name congyu.moe; server_name 01.congyu.moe; root /var/www/html; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; location /avatar { proxy_redirect off; 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 https; proxy_pass https://secure.gravatar.com; proxy_set_header Host "secure.gravatar.com"; proxy_set_header Accept-Encoding ""; proxy_set_header User-Agent $http_user_agent; } location ~ ^/(callback|link|sub|telegram/q83tzYkDw0LmWo1XhYpg8zkm|payment|admin|mod_mu|password/token) { proxy_pass http://38.58.183.133:43210; 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 / { proxy_pass http://38.58.183.133: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; } listen [::]:443 ssl ipv6only=on; listen 443 ssl; ssl_certificate /etc/letsencrypt/live/congyu.moe/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/congyu.moe/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; } server { if ($host = congyu.moe) { return 301 https://$host$request_uri; } listen 80; listen [::]:80; server_name congyu.moe; return 404; } server { if ($host = 01.congyu.moe) { return 301 https://$host$request_uri; } listen 80; listen [::]:80; server_name 01.congyu.moe; return 404; }