Situation
John Smith Ltd has a web management application on the server 192.168.10.41, port 8080, in plain http. The sales reps also use it outside the office and want an address that opens from the phone with the padlock: https://erp.johnsmith.test/. The application cannot do HTTPS and must not see the internet directly.
The solution is Atlas’s reverse proxy: the appliance’s web server answers on ports 80 and 443, recognises the site by its name, puts a valid Let’s Encrypt certificate in front of it and forwards the request to the application. This scenario covers the whole road, because the proxy alone is not enough: the name must exist in the public DNS, ports 80 and 443 must reach the appliance, and the appliance must reach the internal server.
At the end the application is published, a second site (intranet) is published for the inside only with a self-signed certificate, and from the LAN the public name leads straight to Atlas without leaving through the router.
The form’s fields are explained one by one in the chapter Web; here they are used in order.
What you need
- A console login as administrator (
lwhite), with the Web server (nginx) module installed: without it, Web → Reverse proxy does not appear in the menu. - An A record in the public DNS (the domain provider’s, not Atlas’s DNS):
erp.johnsmith.test→ 198.51.100.40, the public address ofatlas.johnsmith.test. This applies to every name you publish, and Let’s Encrypt checks it. - A way to make tcp ports 80 and 443 of the address 198.51.100.40 reach the appliance (10.20.0.2). It depends on what is in front: the provider’s router or an Argos. See step 2.
- That the appliance can open a connection to the internal server (
192.168.10.41:8080). This is not a given: see the warning in step 4. - The address
it@johnsmith.test, for Let’s Encrypt’s contact email.


Steps
Making 80 and 443 reach the appliance
The appliance does not open ports on the internet by itself: if it is behind a router or a firewall, the ports must be forwarded there. Let’s Encrypt checks the name on port 80; visitors use 443. Atlas’s reverse proxy cannot publish ports other than 80/443 and does not publish non-web services: for those see the Argos manual.
-
If in front of the appliance there is the provider’s router, in its panel forward (port forwarding) tcp 80 and tcp 443 of the public address 198.51.100.40 to 10.20.0.2, the same port. Every router has its own panel: the item is usually called «Port forwarding», «Virtual server» or «NAT».
-
If in front there is an Argos, in its console open Published services → Port publication, press «Add publication» and fill in (the fields are in the Argos manual, chapter “Published services”):
Field Value «Ingress zone» WAN «Protocol» TCP «External port» 80,443«Internal host» 10.20.0.2«Internal port» 0(lists keep their own ports)«Allowed remote sources» empty: visitors come from the whole internet «Comment» Atlas webPress «Create publication», then apply the firewall from Argos’s header and confirm within 60 seconds.
Warning On the same Argos you cannot have both a TCP 80/443 publication and an Argos reverse proxy on the same zone: Argos refuses the second («A reverse proxy answers on TCP 80 and 443 in this zone»). Choose a single owner of ports 80 and 443 of the public address: either Atlas (this scenario) or Argos’s proxy (Argos manual, scenario “Two internal websites with a reverse proxy and Let’s Encrypt”).
For the technician With a DNAT publication (Argos or a router that does not masquerade) Atlas sees the visitor’s real address. If the router masquerades incoming traffic, all visitors appear with the router’s address, and Atlas’s firewall and protection against repeated logins treat them as a single client (and the default gateway counts as “outside”, so the second factor stays required). Check the router’s behaviour before also opening the console (scenario “Opening the console to the internet safely”).
Enabling Let’s Encrypt (once per appliance)
- Open System → Settings and choose the TLS certificates block. Turn on «Enable Let’s Encrypt», type
it@johnsmith.testin «Contact email» and press «Apply». The page is covered with «Issuing the Let’s Encrypt certificate… Do not close this page.» and the operation lasts about a minute: with the Mail module installed the certificate for the nameatlas.johnsmith.testis also issued right away. Wait for it to finish. If Let’s Encrypt is already on, skip this step.
Checking that the appliance reaches the application
-
Open System → Shell and try the connection from the appliance:
curl -sI http://192.168.10.41:8080/ | head -n 1A status line must answer (
HTTP/1.1 200 OK, or a302to the sign-in page). If it does not answer, the proxy will give “502 Bad Gateway” whatever you configure afterwards.
Warning If the application is on the site’s LAN and Atlas reaches it through the tunnel with Argos (scenario “Connecting the site to Argos”), the test may fail even with a perfect tunnel. In the tunnel zone Argos lets through from Atlas to the office LAN only what is already in progress and ping, not new TCP connections (Argos manual, scenario “Joining the site to EDON Atlas”). A server that Atlas must reach with a new connection must be put on a network that Atlas reaches directly (for example the server LAN 10.20.0.0/24), or the site must be published by Argos’s reverse proxy, which is already in the office LAN. Before going on, the command above must work.
The reverse proxy
- Open Web → Reverse proxy and press the «Add proxy» icon. «Add reverse proxy» opens.
- «Name»:
erp. The name cannot be changed after creation; letters, digits, dot, hyphen and underscore are fine. The namesatlas,auto,pbx,roadwarrior,defaultand those starting withedon-are reserved for the appliance’s sites. - «Domains»: type
erp.johnsmith.testand press «Add». The first name in the list gives the certificate its name. - «Destination»:
192.168.10.41:8080. Thehttp://is added by itself. The destination cannot be the appliance itself (the console refuses to answer requests passed through one of its own proxies). - In the «TLS» block choose «Let’s Encrypt» in «TLS mode». A new proxy starts from «Self-signed»; the «Let’s Encrypt» item is there only if you enabled it in step 3.
- In the «Options» block leave «Preserve Host header» on and type
50min «Max body size»: the sales reps attach documents and without this value the limit is 1 MB. Turn on «WebSocket» only if the application has real-time pages. - Press «Add». The page is covered with «Applying the proxy configuration… Do not close this page.». The certificate is requested first (up to a few minutes), then the site is written and nginx reloaded. If the certificate is not obtained the proxy is not created.
- Open the notification bell: «Proxy configured» must appear.
Optional: making the LAN’s PCs reach Atlas directly
From the office, erp.johnsmith.test resolves in the DNS the PCs use. If it resolves to the public address, the request leaves through the router and must come back in (hairpin): it works only if the router supports it. Cleaner is to make the name resolve internally to 10.20.0.2.
- Open DNS → Zones and press «Add zone» only if the zone
johnsmith.testdoes not exist yet in Atlas’s DNS: «Zone name»johnsmith.test, «Reference IP address»10.20.0.2, «Create zone». - Open the zone, press «Add record», «Type»
A, «Name»erp, «IP»10.20.0.2, «Save records». «Record added.» appears.
Warning A zone you create in Atlas becomes authoritative for the whole domain for the domain’s clients: the names you do not recreate there (
www,vpn.atlas…) no longer resolve from the inside. Before creatingjohnsmith.testlist the public names the PCs use and recreate them (chapter DNS, “Example: showing the public name with the internal address from the inside”). If you do not want this risk, skip steps 13 and 14 and leave the name to the public DNS.
A site for the inside only: intranet with a self-signed certificate
The company intranet (intranet.johnsmith.test, 10.20.0.5, port 80) is opened only by those on the network. A public certificate is not needed.
- Web → Reverse proxy → «Add proxy». «Name»
intranet, «Domains»intranet.johnsmith.test, «Destination»10.20.0.5:80. - Leave «TLS mode» on «Self-signed» and press «Add». The site answers in HTTPS with a certificate that browsers do not know: fine where you can install the CA on every PC, not for the public. Port 80 redirects to https.
- If later you want to go back from the public certificate to the self-signed one, select the proxy, change «TLS mode» to «Self-signed» and press «Save»: the old Let’s Encrypt certificate is deleted, unless another site, the mail or the VPN still use it.
Check
-
In the bell: «Proxy configured». In the list of Web → Reverse proxy the
erprow shows the «Let’s Encrypt» label, the public name and the destination192.168.10.41:8080. Theintranetrow shows «Self-signed». -
From a phone on the mobile network (not on the company Wi-Fi)
https://erp.johnsmith.test/opens with the padlock and no warnings, andhttp://erp.johnsmith.test/leads to https. -
From a computer outside the company:
curl -I http://erp.johnsmith.test/ openssl s_client -connect erp.johnsmith.test:443 -servername erp.johnsmith.test </dev/null | grep -E "subject|issuer"The first command answers with a redirect (301) to
https://; the second shows the site’s name and Let’s Encrypt as the issuer. -
From the LAN, if you did steps 13 and 14,
nslookup erp.johnsmith.testfrom a domain PC answers 10.20.0.2. -
The application sees the requests with the Host header
erp.johnsmith.test(if «Preserve Host header» is on).
If something goes wrong
| What you see | What it means | What to do |
|---|---|---|
«Proxy configuration failed», with erp.johnsmith.test: certificate issuance failed (check public DNS and inbound port 80) |
Let’s Encrypt did not reach the name | Check the A record in the public DNS and that port 80 reaches the appliance (step 1 or 2) from an external network. Then press «Add» again. There is nothing to clean up: the proxy was not created |
| «Let’s Encrypt is disabled (enable it in Settings → TLS certificates)» | You chose «Let’s Encrypt» without enabling it | Step 3 |
| «Another reverse proxy operation is already running. Wait for it to finish and try again.» | Only one operation at a time | Wait for the other one’s notification and retry |
| «Nginx rejected the configuration.» | An «Extra directives» entry is not valid | Correct it or remove it: the proxy has not changed |
| «<name> is already served by the site <site>» | That name already belongs to another site, even of the VPN | Use another name or remove the other site |
| «The upstream cannot be this appliance: through the proxy, the console would take internet visitors for local ones» | The destination is an address of Atlas | Put the internal server’s address |
| The site gives «502 Bad Gateway» | The proxy does not reach the server | Redo the step 4 test; check address, port and http/https; see the warning about Argos’s tunnel |
| The application refuses attachments (413) | The body limit is 1 MB | Raise «Max body size» (100m, 2g; 0 removes the limit, not recommended) |
| The site opens from the internet but not from the office | The router does not support hairpin, or the internal DNS gives another address | Steps 13 and 14, or check which DNS the PCs use |
A few things to remember:
- Adding, changing or removing a proxy reconfigures the web server: for a few seconds the open connections on the sites may drop. Do it outside office hours if the sites have a lot of traffic.
- To add a name to an existing proxy (for example
shop.johnsmith.testtoerp), add it at the end of the «Domains» list and press «Save»: the certificate is extended and the old names keep working. If you change the first name, the certificate’s name changes and the old one is deleted when nobody else uses it. - Certificate renewal is automatic. If a name stops pointing to the appliance, renewals fail and
it@johnsmith.testreceives the expiry warnings. - A proxy’s name cannot be changed: to rename it create the new one and remove the old one («Remove» icon in the detail’s bar, with confirmation; the outcome arrives in the bell).
- The sites written by the appliance (the console, the mail, the newsletter, the Git server) appear in the list with a padlock and are not edited from here. To see them press «Show system proxies».
- Users who enter the application with their domain credentials, without a separate password, are the next scenario: Single sign-on (SSO) to an application.