Follow each step exactly. Do not skip steps.
- Click Websites & Domains in the left sidebar.
- Click Add Domain.
- Enter
api.project-nexus.netin the Domain name field. - Select Hosting type: Website hosting.
- Click OK.
- Wait for the page to reload.
You see api.project-nexus.net in the Websites & Domains list.
- Click Websites & Domains in the left sidebar.
- Click on
api.project-nexus.netto expand it. - Click SSL/TLS Certificates.
- Scroll to Install a free basic certificate provided by Let's Encrypt.
- Click Install.
- Check the box next to
api.project-nexus.net. - Click Get it free.
- Wait for the certificate to install.
A green padlock icon appears next to api.project-nexus.net in the domain list.
- Click Websites & Domains in the left sidebar.
- Click on
api.project-nexus.netto expand it. - Click Hosting Settings.
- Scroll to the Security section.
- Check Permanent SEO-safe 301 redirect from HTTP to HTTPS.
- Click OK.
Open http://api.project-nexus.net in a browser. It redirects to https://api.project-nexus.net.
- Click Websites & Domains in the left sidebar.
- Click on
api.project-nexus.netto expand it. - Click Apache & nginx Settings.
- Scroll to Additional nginx directives.
- Delete any existing text in the box.
- Paste the following:
location / {
proxy_pass http://127.0.0.1:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
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_cache_bypass $http_upgrade;
}
- Click OK.
- Wait for the configuration to apply.
No error message appears after clicking OK.
- Click Tools & Settings in the left sidebar.
- Click Services Management under Server Management.
- Find nginx in the list.
- Click the Restart button next to nginx.
- Wait for the status to return to Running.
The nginx status shows a green Running indicator.
- Open a new browser tab.
- Enter
https://api.project-nexus.net/healthin the address bar. - Press Enter.
The page displays the word Healthy.
The ASP.NET application is not running on the server.
DNS is not configured. Add an A record for api.project-nexus.net pointing to your server IP.
The nginx configuration was not applied. Repeat Section 4.
DNS has not propagated yet. Wait 10 minutes and try again.
- Domain added
- SSL certificate installed
- HTTPS redirect enabled
- Nginx proxy configured
- Web server restarted
- /health returns Healthy