Score:0

How do I get apache (on Ubuntu 22.04) to allow me access via port 5443 (ie not with ports 80 or 443)

py flag

Hi I know this question has been asked before but I've tried all the suggestions and I still can't get apache to show the 'it works' page. I'm using Ubuntu 22.04 on a remote vps. If I don't use port 5443 (ie I just enter myurl) I get the Apache 'it works' page. I've set ufw to allow 5443 tcp and udp. I've added Listen 5443 to ports.conf. I've tried changing <VirtualHost *:80> to <VirtualHost *:80 *:5443> I've done the same for 443 (<VirtualHost *:443 *:5443> and finally I've tried setting up a separate virtual host with port 5443 as its port. I really can't think of anything else I can do. Any suggestions would be very welcome.

Below is the text of the separate virtual host file:

<IfModule mod_ssl.c>
<VirtualHost *:5443> 

    ServerAdmin webmaster@localhost
    ServerName myserver.org.uk
    ServerAlias www.myserver.org.uk
    DocumentRoot /path/to/directory

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /path/to/directory>
       AllowOverride All
    </Directory>
    SSLCertificateFile /etc/letsencrypt/live/myserver.org.uk/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/myserver.org.uk/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
in flag
What is the exact error message you encounter when you try to reach that port?
gavrillo avatar
py flag
It just times out viz 'The connection has timed out'
in flag
A timeout indicates a firewall issue. Check for another firewall outside of your server.
gavrillo avatar
py flag
Thanks for that. There is a router between me and www. I've never looked, but it might have its own firewall.
gavrillo avatar
py flag
Gerald: I can't thank you enough for this bit of information. It turns out that although I've got a vps with its own firewall I still have to get my isp to open the ports. This would never have crossed my mind without your comment above. It now works! Thankyou :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.