Setting up apache w/SSL

Problems? Post here...
Post Reply
User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Setting up apache w/SSL

Post by Gogeta70 »

Ok, so i'm setting up my home web server again, and just for fun, i guess, i wanted to set up SSL as well. I've managed to generate my certificate and all that but when i set the configuration file options to enable SSL, apache won't start. I've googled around a bit, but didn't find any help there. I'm installing this on Windows XP, and i know bad_brain has installed ssl recently, so maybe he, or someone else can help. Thanks in advance.

Oh, and here is what i added to the httpd.conf file:

Code: Select all

Listen 443 
<VirtualHost www.G70net.com:443>
ServerName www.g70net.com
SSLEngine on
SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.crt"
SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.key"
</VirtualHost>
¯\_(ツ)_/¯ It works on my machine...

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

DocumentRoot directive is missing:

Code: Select all

Listen 443
<VirtualHost www.G70net.com:443>
ServerName www.g70net.com
DocumentRoot /path/to/site
SSLEngine on
SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.crt"
SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.key"
</VirtualHost> 
and if possible better use the IP here:

Code: Select all

<VirtualHost www.G70net.com:443> 
it's known to be more reliable to use the IP.... :wink:

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

Hmm, apache still won't start:

Code: Select all

#Listen 443 
#<VirtualHost 75.81.***.**:443>
#ServerName www.g70net.com
#DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
#SSLEngine on
#SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.crt"
#SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.key"
#</VirtualHost>
¯\_(ツ)_/¯ It works on my machine...

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

hm, is the NameVirtualHost directive at the beginning of the the vhost config file? it has to be outside of the virtualhosts containers...

Code: Select all

NameVirtualHost 75.81.***.**:443
if it still don't works feel free to post the config on http://code.suck-o.com so I can have a look... :wink:

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

Ok, i'll post my config file, but i noticed something in the logs:

Code: Select all

[notice] Parent: Received restart signal -- Restarting the server.
[Mon Dec 22 04:05:15 2008] [notice] Child 10680: Exit event signaled. Child process is ending.
Syntax error on line 480 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf:
Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration
[Mon Dec 22 04:05:15 2008] [warn] (OS 995)The I/O operation has been aborted because of either a thread exit or an application request.  : winnt_accept: Asynchronous AcceptEx failed.
[Mon Dec 22 04:05:16 2008] [notice] Child 10680: Released the start mutex
[Mon Dec 22 04:05:17 2008] [notice] Child 10680: All worker threads have exited.
[Mon Dec 22 04:05:17 2008] [notice] Child 10680: Child process is exiting
It says on line 480 of httpd.conf, invalid command "SSLEngine"? :?

(don't mind the date/time, i still need to set my clock lol)

http://code.suck-o.com/122
¯\_(ツ)_/¯ It works on my machine...

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

uncomment line 119, the SSL module isn't enabled, don't forget to restart Apache afterwards.... :wink:

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

#-o lol, thanks. Works now.
¯\_(ツ)_/¯ It works on my machine...

Post Reply