Shared IPv4 web proxy: websites for servers without a public IP
Servers on an internal network (for example products with Internal network only) have no public IPv4 of their own. The shared IPv4 web proxy lets them host websites anyway: the node runs a reverse proxy on one of its public addresses and sends each visitor to the right server by domain name.
- Port 80 goes to port 80 of the server, chosen by the
Hostheader. - Port 443 goes to port 443 of the server, chosen by the TLS name (SNI). The traffic is not decrypted: each server keeps its own certificate, and Let’s Encrypt works with the HTTP check on port 80.
- Optional PROXY protocol v2 per domain, so the web server sees the visitor’s address.
Turn it on for a node
Section titled “Turn it on for a node”- Open the node page, tab Network, tile Shared IPv4 web proxy, then Set up.
- Switch on Web proxy on this node and check the Shared IPv4 address (it is prefilled with the NAT WAN address).
- Click Save. The node agent (0.31.0 or newer) installs HAProxy when it is missing and starts it in its own
service
nexovirt-proxy, listening on ports 80 and 443 of that address only.
The page lists every domain of the node with its server and status. Apply again sends the configuration once more after a failure. Nodes with Network managed outside NexoVirt cannot use the proxy.
Domains for a server
Section titled “Domains for a server”Customers need the portal feature Websites on the shared IPv4 (Settings > Customer portal, default off). Admins add domains on the server page, tab Network, card Websites. A product sets Website domains per server (empty = 5, 0 = none).
- Add the domain on the Websites card.
- Point an A record of the domain to the shared address shown on the card.
- Add the TXT record
_nexovirt-challenge.<domain>with the value shown for the domain. It proves the domain is yours; you may remove it once the domain is active. - Click Check again (the panel also checks every 5 minutes). The domain turns Active and the proxy sends its visitors to the server.
- A domain is active on one server at most. Several servers may claim the same name; the first that proves it wins and the other claims are removed. Claims that are not proven within 72 hours are removed.
- Active domains are checked daily. A domain whose A record no longer points to the shared address turns Inactive, is taken out of the proxy and the customer gets an email. It needs the TXT proof again.
- When a server moves to another node, its domains need a new proof for that node’s address. If the target node has no web proxy, the domains are removed and the migration reports it.
- Deleting the server removes its domains. Its private address stays reserved until the node no longer sends traffic to it, so it never reaches the next server that gets the address.
- If the node does not take a removal for 30 minutes, an inbox alert web_proxy_stuck fires. The panel keeps trying.
| Endpoint | Purpose |
|---|---|
GET /api/v1/hosts/{id}/guests/{type}/{vmid}/domains | Domains of a server, the shared address, the limit |
POST /api/v1/hosts/{id}/guests/{type}/{vmid}/domains | Add {domain, proxy_protocol} |
POST /api/v1/hosts/{id}/guests/{type}/{vmid}/domains/{did}/check | Check DNS now |
DELETE /api/v1/hosts/{id}/guests/{type}/{vmid}/domains/{did} | Remove a domain |
GET /api/v1/hosts/{id}/nodes/{node}/web-proxy | Node settings, state and domains |
PUT /api/v1/hosts/{id}/nodes/{node}/web-proxy | {enabled, ipv4} |
The customer API (/api/portal/v1) has the same server paths (DELETE .../domains/{did} to remove).
NexoVirt is developed and designed by Nucez Software, your partner for custom software and web design.