I'm trying to install trac and mod_wsgi over SSL. I tried to manually install it, but that didn't work out so well so I started to follow this: trac-on-ubuntu
I skipped the svn part because I'd like to use git instead. After the first edit of httpd.conf:
WSGIScriptAlias /trac /var/trac/apache/trac.wsgi
<Directory /var/trac/apache>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
I restarted apache only to get this error:
* Restarting web server apache2
(98)Address already in use: make_sock: could not bind to address [::]:443
[ OK ]
Doing these showed nothing.
netstat -anp | grep 443
fuser 443/tcp
Doing this didn't yield anything except the grep command that I ran:
ps -aux | grep httpd
Why is it saying that something else is using the port when there's nothing showing up?
EDIT: You guys are going to laugh at this. I had an extra Listen 443 in ports.conf that shouldn't have been there. Removing that solved this.
I seconded Matthieu answer
I commented #Listen 443 in httpd-ssl file and apache can be started
Because the file already has VirtualHost default:443
I use apache version 2.4.27, also have this problem, solved it through modify
the conf/extra/httpdahssl.conf,comment the 18 line content(Listen 443 https),it works fine.
I made the mistake of incorrectly naming a backup file in the /etc/httpd/conf.d directory. In the README it states that it alphabetically goes through all .conf files.
I had created ssl-<date>.conf (meant to be a backup) and it was loading before ssl.conf. It was binding the :443 port based on the ssl-<date>.conf and failing on the ssl.conf.
Once I renamed the backup file to ssl.conf.<date>, the service started without issue.
As a note, the server I'm on is running RHEL 6
I am using Ubuntu. I just disabled ssl mode of apache2 and it worked for me.
a2dismod ssl
and then restarted apache2.
service apache2 restart
Thank you for you answers, on apache 2.4.x versions if have installed ssl_module using yum command, dont want to add the port :443 in httpd.conf (main) file,
To find out the port 443 in configure files,
# grep '443' /etc/httpd/conf.d/*
/etc/httpd/conf.d/ssl.conf:Listen 443 https
/etc/httpd/conf.d/ssl.conf:<VirtualHost _default_:443>
/etc/httpd/conf.d/ssl.conf:#ServerName www.example.com:443
# grep '443' /etc/httpd/conf/httpd.conf
Listen 443
Just remove the line or command it (Listen 443) from httpd.conf file.
I'm adding another answer to this as I had the same problem and solved it the same way:
I had installed SSL on apache2 using a2enmod ssl
, which seems to have added an extra configuration in /etc/apache2/ports.conf
:
NameVirtualHost *:80
Listen 80
NameVirtualHost *:443
Listen 443
<IfModule mod_ssl.c>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
I had to comment out the first Listen 443
after the NameVirtualHost *:443
directive:
NameVirtualHost *:443
#Listen 443
But I'm thinking I can as well let it and comment the others. Anyway, thank you for the solution :)
Let me add one more reason for the error. In httpd.conf I included explicitly
Include etc/apache24/extra/httpd-ssl.conf
while did not notice previous wildcard
Include etc/apache24/extra/*.conf
Grepping 443 will not find this.
I have checked and fixed the following and got it resolved -
/etc/httpd/conf/
10.12.13.4:80
I had same issue, was due to multiple copies of ssl.conf In /etc/httpd/conf.d - There should only be one.
I meet the problem in windows7, phpeclipse, when I start the XAMPP. My solution is :
1.Commented out the \xampp\apache\conf\httpd.conf -> line171 -> #LoadModule ssl_module modules/mod_ssl.so
2.line539 -> #Include conf/extra/httpd-ssl.conf
or you can change the 443 port to another one
In httpd.conf instead:
Listen *:443
you need write Listen 127.0.0.1:443
It works for me.
For everyone else who has no duplicate Listen directives and no running processes on the port: check that you don't accidentally include ports.conf twice in apache2.conf (as I did due to a bad merge).
Source: Stackoverflow.com