For some reason most browsers seem to block webservers on ports higher than 10K.
Apf now by default maps all server containers (80) to host port 10080. I tried Nginx and httpd.
Maybe change the default port to something like 9080 or 8080 to avoid this problem.
Docker ➤ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c88969704c48 nginx "/docker-entrypoint.…" 15 minutes ago Up 15 minutes 80/tcp nginx
Docker ➤ apf nginx
* ==> : Forwarding local listening ports to (==>) remote ports
* <== : Forwarding to local ports from (<==) remote listening ports (use -r option)
Forwarding: [10080 ==> 80]
Get request from Netcat. Website root (Nginx default page) is loaded.
Docker ➤ nc localhost 10080
GET / HTTP/1.2
Host: localhost
HTTP/1.1 200 OK
Server: nginx/1.21.4
Date: Thu, 10 Feb 2022 09:28:03 GMT
Content-Type: text/html
Content-Length: 615
Last-Modified: Tue, 02 Nov 2021 14:49:22 GMT
Connection: keep-alive
ETag: "61814ff2-267"
Accept-Ranges: bytes
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
Docker ➤
Browser
