sip_admin
sip_admin

Reputation: 59

Apache listen on 2 ports for same SSL virtual host

I have an issue where an external site is requesting data from an internal server using port 444 which my firewall translates to 443.

The problem is, my internal clients don't get a response from the internal server when they make a request on 444 as there is no firewall in the way to forward the port to 443.

I want to make the apache server listen on both 443 and 444 ports but I have zero Ubuntu/apache experience, and have no documentation on how the server was configured, so I've hit a bit of a wall.

I can access the ports.conf file and it looks like this:

#
Listen 80
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
\#

Then there is the file /sites-enabled/default-ssl.conf that "points" at ../sites-available/default-ssl.conf, and it looks like this

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin [email protected]
ServerName web.oursite.com
ServerAlias web.outsite.com
DocumentRoot /var/www/html
...

followed by a bit of SSL certificate stuff and other directory stuff

apache2.conf doesn't seem to have anything non-default in it

Could anyone help me with what I need to add to the ports.conf file and/or the default-ssl.conf file?

Upvotes: 5

Views: 7693

Answers (1)

Daniel Ferradal
Daniel Ferradal

Reputation: 2890

Basically with the Listen directive and then the virtual host can use two ports too:

Listen 443
Listen 444

and then:

<VirtualHost *:443 *:444>
     #rest of the virtualhost config here
</VirtualHost>

Upvotes: 7

Related Questions