Nav444
asked on
How to define second ssl port on Apache
Hi,
I am trying to setup two or more ssl certificates for a machine.
I have just one IP
I have two name based Virtual hosts.
I have two separate SSL certificates.
I tried to assign each Virtual host a different port for SSL 443 and 444
I used:
Listen 80
Listen 443
Listen 444
NameVirtualHost 161.58.58.10:80
NameVirtualHost 161.58.58.10:443
NameVirtualHost 161.58.58.10:444
### site1
<VirtualHost *:80>
ServerName www.domain1.com
DocumentRoot /www/htdocs/
</VirtualHost>
# ssl site:
<VirtualHost 161.58.58.10:443>
ServerName www.domain1.com
DocumentRoot /www/htdocs/testcom/
SSLEnable
SSLCertificateFile /path/to/ceritficate1.crt
SSLCertificateKeyFile /path/to/ceritficate1.key
SSLCACertificateFile /path/to/intermediate1.crt
</VirtualHost>
#### site 2
<VirtualHost *:80>
ServerName www.domain2.com
DocumentRoot /www/htdocs/
</VirtualHost>
# ssl site:
<VirtualHost 161.58.58.10:444>
ServerName www.domain2.com
DocumentRoot /www/htdocs/testcom/
SSLEnable
SSLCertificateFile /path/to/ceritficate2.crt
SSLCertificateKeyFile /path/to/ceritficate2.key
SSLCACertificateFile /path/to/intermediate2.crt
</VirtualHost>
==========================
But with above configuration, it is still sees the port 443 when I try to use https://www.domain2.com
I do not define port number if my URL link, and I want to avoid it.
Is there any way to do this?
Thanks,
Nav
I am trying to setup two or more ssl certificates for a machine.
I have just one IP
I have two name based Virtual hosts.
I have two separate SSL certificates.
I tried to assign each Virtual host a different port for SSL 443 and 444
I used:
Listen 80
Listen 443
Listen 444
NameVirtualHost 161.58.58.10:80
NameVirtualHost 161.58.58.10:443
NameVirtualHost 161.58.58.10:444
### site1
<VirtualHost *:80>
ServerName www.domain1.com
DocumentRoot /www/htdocs/
</VirtualHost>
# ssl site:
<VirtualHost 161.58.58.10:443>
ServerName www.domain1.com
DocumentRoot /www/htdocs/testcom/
SSLEnable
SSLCertificateFile /path/to/ceritficate1.crt
SSLCertificateKeyFile /path/to/ceritficate1.key
SSLCACertificateFile /path/to/intermediate1.crt
</VirtualHost>
#### site 2
<VirtualHost *:80>
ServerName www.domain2.com
DocumentRoot /www/htdocs/
</VirtualHost>
# ssl site:
<VirtualHost 161.58.58.10:444>
ServerName www.domain2.com
DocumentRoot /www/htdocs/testcom/
SSLEnable
SSLCertificateFile /path/to/ceritficate2.crt
SSLCertificateKeyFile /path/to/ceritficate2.key
SSLCACertificateFile /path/to/intermediate2.crt
</VirtualHost>
==========================
But with above configuration, it is still sees the port 443 when I try to use https://www.domain2.com
I do not define port number if my URL link, and I want to avoid it.
Is there any way to do this?
Thanks,
Nav
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you want two SSL servers, you'll need to do what I do and
dev, tst, and devel- create totally different install trees for each
Apache instance. See:
http://www.linux.com/article.pl?sid=04/05/24/1450203
The idea is to have multiple builds of Apache on the same system,
and call them within their own chroots.
If you want to conceal the http://host:port address from the overhead
browser bins then you might be able to serve the page through a proxy or
with some server side programming that snatches that https://host:port/page.shtml
and serves it up under the default server with an alternate URL.
dev, tst, and devel- create totally different install trees for each
Apache instance. See:
http://www.linux.com/article.pl?sid=04/05/24/1450203
The idea is to have multiple builds of Apache on the same system,
and call them within their own chroots.
If you want to conceal the http://host:port address from the overhead
browser bins then you might be able to serve the page through a proxy or
with some server side programming that snatches that https://host:port/page.shtml
and serves it up under the default server with an alternate URL.
Use: https://yourdomain.tld:444/