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/a … des/centos">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 sslmodule modules/modssl.so

Listen 443

NameVirtualHost [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?

4 Replies

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?

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

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.

yep..i was including the .conf file twice..stupid me!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct