LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Apache2 + ssl (https://www.linuxquestions.org/questions/debian-26/apache2-ssl-736647/)

netpumber 06-30-2009 05:39 AM

Apache2 + ssl
 
Hi all out there.

In my home server (debian) i start working with ssl. I create the cert and the key. Also i move the httpd-ssl.conf file in /etc/apache2/conf.d directory. I have configure the

PHP Code:

SSLCertificateFile  and SSLCertificateKeyFile 

in httpd-ssl.conf file. Now when i m going to start my apache service it returns me this error:

Quote:

Starting web server (apache2)...Syntax error on line 56 of /etc/apache2/conf.d/httpd-ssl.conf:
Invalid command 'SSLPassPhraseDialog', perhaps misspelled or defined by a module not included in the server configuration
failed!
Any idea on how to fix it ?

Thanks a lot..

zhjim 06-30-2009 07:22 AM

Debian uses quite a diffrent structure inside /etc/apache2. While in slackware it's all flat files and with a conf.d directory debian splits up the files in diffrent directories. And how I think in a very cool manner.
You have two main types of directories: sites and mods. These are split up into two other: mods-available mods-enable, sites-available sites-enabled.
Just do a ls /etc/apache and it should be all clear

So for your error message. It just says that the needed module for SSL is not loaded. cd into /etc/apache2/mods-enabled and create a symlink with ln -s ../mods-available/ssl.conf ./ && ln -s ../mods-available/ssl.load ./

Then you should be set

Cheers Zhjim

P.S. this holds true if you used the package coming with > Debian 4 etch

netpumber 06-30-2009 08:11 AM

So...i have something like this in my sites-available/default :

Quote:

NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
# Non-SSL site
...
</VirtualHost>
<VirtualHost *:443>
# SSL site
....
</VirtualHost>
In ports.conf file :
Quote:

Listen 443
Listen 80
And when i try to start the apache gives me this:

Quote:

Starting web server (apache2)...(98)Address already in use: make_sock: could not bind to address [::]:443
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
i check with netstat that there isn't any other connection in 443 port.

Have you god anything in mind..an whats going on with 443 port?

zhjim 06-30-2009 11:46 AM

Quote:

Originally Posted by netpumber
Have you god anything in mind..an whats going on with 443 port?

443 is the standard ssl enabled http port. a.k.a. https. Check out /etc/services for a list of standard protocols and their affiliated services.

Did you add the Listen 443 to ssl.conf on your own? If you use the standard config you don't need to. Do a

Code:

grep -R "Listen" -i /etc/apache2
to see if you maybe have to of the Listen 443 directives.

One thing that might be hindering apache to start is the last line of the error message.
Code:

Unable to open logs
Seems like the path to your log files does not exists or is not writeable...

How did you check with netstat?

Code:

netstat -tulpn | grep 443
-n is important it prints numbers insted of the names taken from /etc/services


All times are GMT -5. The time now is 06:39 PM.