| Author |
Message |
lencholamas
Joined: 09 Feb 2012
Posts: 6
|
| Posted: Thu Feb 09, 2012 4:14 pm Post subject: help with apache config with ssl self cert |
|
|
hi i'm getting stuck on setting up a self-signed ssl cert on my linux box. I followed the directions here: http://library.linode.com/web-servers/apache/ssl-guides/centos but still not helping.
When I restart apache i get "NameVirtualHost [ip]:443 has no VirtualHosts"
In my ssl.conf file i have the following:
LoadModule ssl_module modules/mod_ssl.so
#Listen 443
NameVirtualHost [ip]:443
<VirtualHost [ip]:443>
SSLEngine on
SSLProtocol all -SSLv2
SSLCertificateFile /etc/httpd/ssl/httpd.pem
SSLCertificateKeyFile /etc/httpd/ssl/httpd.key
.
.
.
so i do have a virtual host defined..not sure what's going on? anyone help? |
|
| Back to top |
|
hybinet
Joined: 02 May 2008
Posts: 1058
|
| Posted: Thu Feb 09, 2012 4:46 pm Post subject: |
|
|
Are you sure you got the IP address exactly right? Check for typos. Also check out this page. (In fact, I'm not sure if you even need NameVirtualHost there, since SSL is technically IP-based virtual hosting.)
Why do you have "Listen 443" commented out? |
|
| Back to top |
|
lencholamas
Joined: 09 Feb 2012
Posts: 6
|
| Posted: Thu Feb 09, 2012 4:55 pm Post subject: |
|
|
i'm pretty sure i got the ip address right. when i uncomment the listen 443 back in..i get this error (i cna't even boot up apache):
[Thu Feb 09 21:54:29 2012] [warn] NameVirtualHost [ip]:443 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:443 |
|
| Back to top |
|
hybinet
Joined: 02 May 2008
Posts: 1058
|
| Posted: Thu Feb 09, 2012 7:18 pm Post subject: |
|
|
That's really strange. Are you sure there's nothing else listening on port 443? Perhaps there's a duplicate "Listen" or "NameVirtualHost" line somewhere?
Different versions of Apache on different OS's have different configuration hierarchies, and different tutorials also recommend different file/folder structures, so it's not easy to tell where everything is. This can result in duplicate or conflicting entries. Start with httpd.conf and you'll be able to figure out which files/folders are included. |
|
| Back to top |
|
lencholamas
Joined: 09 Feb 2012
Posts: 6
|
| Posted: Thu Feb 09, 2012 10:27 pm Post subject: |
|
|
| yep..i was including the .conf file twice..stupid me! |
|
| Back to top |
|
| |