Hi everyone,
I'm a LAMP newbie, working with Debian. I have 3 websites, each on a unique IP addresses. I'm trying to set up a subdomain with SSL on the 3rd website. In other words, I have example1.com, example2.com, and example3.com, all with unique ips. I'm trying to set up SSL on subdomain.example3.com.
I've followed the instructions
here and
here as best I can, but no luck.
When I restart the web server, I get an error message that says "Restarting web server: apache2 failed!" When I look in the Apache error log, I'm sometimes seeing: "[notice] caught SIGTERM, shutting down." That's it.
I can get the web server to restart properly by editing the VirtualHost and commenting the line that says "SSLEngine On." But then SSL obviously doesn't work.
It's possible I've made a silly mistake, or several mistakes. I have no idea what I'm doing. Here's what my config files look like:
/etc/apache2/ports.conf
Code:
NameVirtualHost 11.111.111.111:80
NameVirtualHost 22.222.222.222:80
NameVirtualHost 33.333.333.333:80
NameVirtualHost 33.333.333.333:443
Listen 80
<IfModule mod_ssl.c>
Listen 443
</IfModule>
/etc/apache2/sites-available/example3.comCode:
<VirtualHost 33.333.333.333:80>
ServerAdmin hostmaster@example3.com
ServerName example3.com
ServerAlias www.example3.com
DocumentRoot /srv/www/example3.com/public_html/
ErrorLog /srv/www/example3.com/logs/error.log
CustomLog /srv/www/example3.com/logs/access.log combined
</VirtualHost>
/etc/apache2/sites-available/subdomain.example3.comCode:
<VirtualHost 33.333.333.333:80>
ServerAdmin hostmaster@example3.com
ServerName subdomain.example3.com
DocumentRoot /srv/www/subdomain.example3.com/public_html/
ErrorLog /srv/www/subdomain.example3.com/logs/error.log
CustomLog /srv/www/subdomain.example3.com/logs/access.log combined
</VirtualHost>
<VirtualHost 33.333.333.333:443>
ServerAdmin hostmaster@example3.com
ServerName subdomain.example3.com
DocumentRoot /srv/www/subdomain.example3.com/public_html/
ErrorLog /srv/www/subdomain.example3.com/logs/error.log
CustomLog /srv/www/subdomain.example3.com/logs/access.log combined
SSLEngine On
SSLCertificateFile /etc/ssl/localcerts/subdomain.example3.com.crt
SSLCertificateKeyFile /etc/ssl/localcerts/subdomain.example3.com.key
SSLCACertificateFile /etc/ssl/geotrust.cer
</VirtualHost>
I have confirmed that the paths are correct for the certificate files, but I notice that the tutorials recommend different paths. One says to use /etc/apache2/... The other says /etc/ssl/. I'm using the latter. Could this be part of the problem?
/etc/network/interfacesCode:
auto eth0 eth0:0 eth0:1
# eth0 - This is the main IP address that will be used for most outbound connec$
# The address, netmask and gateway are all necessary.
iface eth0 inet static
address 33.333.333.333
netmask 255.255.255.0
gateway 33.333.333.1
# eth0:0
iface eth0:0 inet static
address 11.111.111.11
netmask 255.255.255.0
#eth0:1
iface eth0:1 inet static
address 22.222.222.222
netmask 255.255.255.0
I'm using a RapidSSL certificate I bought from NameCheap. The Common Name is in the form of 'subdomain.example3.com'. Please let me know if there's any other information I can provide. I'm stumped.