I install NginX as a reverse proxy for Apache. Then set it to listen port(443) for https, and let Apache to listen port 8443 for https.
When visiting:
https://www.sample.com:443
https://www.sample.com:8443
via a normal browser such as Chrome, then both are OK.
But when using webpagetest to test the above two URLs, then the first one is OK. but the 2nd one will always return time-out error.
Why?
From the setup described, you have Nginx set up as a reverse proxy to Apache, with Nginx listening on the standard HTTPS port (443) and Apache on port 8443. When clients connect to the standard port, the requests are properly forwarded through Nginx to Apache, and the website content is served as expected. However, when attempting to connect directly to Apache on port 8443, WebPageTest encounters a timeout error.
First, make sure your firewall rules allow traffic on port 8443. If you are on Linux, for instance,
sudo ufw allow 8443/tcp
.And try accessing
https://sample.com:8443
from a different network or using a different tool to see if the issue persists.Check your Apache setting: it must listen on port 8443, with a correct SSL/TLS configuration.
Check the WebPageTest documentation on private Web server install for any option which might have an impact on your setup.