View previous topic :: View next topic |
Author |
Message |
ibasaw Tux's lil' helper

Joined: 27 Aug 2006 Posts: 130 Location: France
|
Posted: Mon May 17, 2010 3:58 pm Post subject: [Apache]Address already in use: make_sock: ... |
|
|
Bonjour,
Je n'arrive pas à résoudre un conflit de vhost avec le SSL, voici le resulat d'un grep Listen httpd.conf vhosts.d/*.conf modules.d/*.conf
Code: |
vhosts.d/00_default_ssl_vhost.conf:# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
vhosts.d/00_default_ssl_vhost.conf:Listen 443
vhosts.d/00_default_vhost.conf:# Listen: Allows you to bind Apache to specific IP addresses and/or
vhosts.d/00_default_vhost.conf:# Change this to Listen on specific IP addresses as shown below to
vhosts.d/00_default_vhost.conf:#Listen 12.34.56.78:80
vhosts.d/00_default_vhost.conf:Listen 80
vhosts.d/vhost_redmine.conf: Listen 443
|
J'ai dans mon serveur le fichier 00_default_ssl_vhost.conf non modifié, et le seul fichier qui appelle SSL est le fichier vhost_redmine.conf ci dessous:
Code: |
<IfDefine SSL>
<IfDefine SSL_DEFAULT_VHOST>
<IfModule ssl_module>
Listen 443
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
SSLOptions StrictRequire
SSLProtocol all -SSLv2
ServerName www.xxx.com
DocumentRoot /var/www/localhost/htdocs/redmine/public
CustomLog /home/var/log/apache2/xxx.com.access_log combined
Errorlog /home/var/log/apache2/xxx.com.error_log
RailsBaseURI /
# The maximum number of Ruby on Rails application instances that may be simultaneously active.
# A larger number results in higher memory usage, but improved ability to handle concurrent HTTP clients.
# normally 1 to 10. (1 for each 50mb ram)
RailsMaxPoolSize 1
# The maximum number of seconds that a Ruby on Rails application instance may be idle.
# That is, if an application instance hasn't done anything after the given number of seconds,
# then it will be shutdown in order to conserve memory. ( 1 hour)
RailsPoolIdleTime 3600
RailsEnv 'production'
<Directory /var/www/localhost/htdocs/redmine/public>
SSLRequireSSL
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Location /server-status>
SetHandler server-status
order deny,allow
deny from all
</Location>
<Location /svn-private>
DAV svn
SVNParentPath "/home/svn"
Order deny,allow
Deny from all
# only allow reading orders
<Limit GET PROPFIND OPTIONS REPORT>
Allow from localhost
</Limit>
</Location>
</VirtualHost>
</IfModule>
</IfDefine>
</IfDefine>
|
Dès que je veux redemmarer Apache, j'ai cett erreur:
Code: | Address already in use: make_sock: could not bind to address [::]:443 |
Et donc plus aucun site sur le serveur ne fonctionne !
Je fais du kill/zap, restart mais c'est pas la solution.
Comment résoudre mon conflit, bien écrire mon fichier redmine, pour qu'il n'y ait plus de conflit ?
Merci de votre aide. |
|
Back to top |
|
 |
Oupsman Veteran

Joined: 19 Jul 2004 Posts: 1042
|
Posted: Mon May 17, 2010 4:18 pm Post subject: |
|
|
Message supprimé _________________ --
L'idéal de nouveauté semble avoir remplacé l'idéal de progrès. C'est bien triste.
----
Unix philosophy: "Do one thing and do it well."
systemd: "Try to do everything and do it wrong."
Last edited by Oupsman on Wed May 15, 2013 5:56 am; edited 1 time in total |
|
Back to top |
|
 |
ibasaw Tux's lil' helper

Joined: 27 Aug 2006 Posts: 130 Location: France
|
Posted: Mon May 17, 2010 4:23 pm Post subject: |
|
|
J'ai aussi un user root
Code: |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 5074 apache 4u IPv6 316731278 0t0 TCP *:https (LISTEN)
apache2 5141 apache 4u IPv6 316731278 0t0 TCP *:https (LISTEN)
apache2 5342 apache 4u IPv6 316731278 0t0 TCP *:https (LISTEN)
apache2 5927 apache 4u IPv6 316731278 0t0 TCP *:https (LISTEN)
apache2 6154 apache 4u IPv6 316731278 0t0 TCP *:https (LISTEN)
apache2 6187 apache 4u IPv6 316731278 0t0 TCP *:https (LISTEN)
apache2 25854 root 4u IPv6 316731278 0t0 TCP *:https (LISTEN)
|
|
|
Back to top |
|
 |
boozo Advocate


Joined: 01 Jul 2004 Posts: 3193
|
|
Back to top |
|
 |
guilc Bodhisattva


Joined: 15 Nov 2003 Posts: 3326 Location: Paris - France
|
Posted: Tue May 18, 2010 8:05 am Post subject: |
|
|
Enlève la directive Listen dans "vhost_redmine.conf". Ce qui indique à apache sur quel port configurer le vhost c'est "<VirtualHost *:443> ". La, avec tes 2 listen sur le même port, tu demandes à apache de binder 2 fois le port 443.
boozo, sisi on peut, ça marche très bien. Apache présentera le bon contenu de vhost.
Il y a une seule limitation : que le navigateur support le SNI (http://en.wikipedia.org/wiki/Server_Name_Indication), sinon, le certificat présenté sera celui du vhost ssl par défaut au lieu du certificat du vhost correspondant _________________ Merci de respecter les règles du forum.
Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing |
|
Back to top |
|
 |
ibasaw Tux's lil' helper

Joined: 27 Aug 2006 Posts: 130 Location: France
|
Posted: Wed May 19, 2010 7:28 am Post subject: |
|
|
J'ai effectué ton indication Guilc, et ca à l'air de fonctionner, je vais surveiller de près.
Merci. |
|
Back to top |
|
 |
Poussin l33t

Joined: 08 Jun 2007 Posts: 659 Location: Liège
|
Posted: Wed May 19, 2010 11:05 am Post subject: |
|
|
guilc wrote: | Enlève la directive Listen dans "vhost_redmine.conf". Ce qui indique à apache sur quel port configurer le vhost c'est "<VirtualHost *:443> ". La, avec tes 2 listen sur le même port, tu demandes à apache de binder 2 fois le port 443.
boozo, sisi on peut, ça marche très bien. Apache présentera le bon contenu de vhost.
Il y a une seule limitation : que le navigateur support le SNI (http://en.wikipedia.org/wiki/Server_Name_Indication), sinon, le certificat présenté sera celui du vhost ssl par défaut au lieu du certificat du vhost correspondant |
C'est bien dommage qu'on ne puisse se faire son petit serveur personnel en SSL gratuitement. Les CA selfsigned font tout de suite gueuler les navigateurs maintenant, et le commun des mortels va dire "ça ne marche pas"  |
|
Back to top |
|
 |
guilc Bodhisattva


Joined: 15 Nov 2003 Posts: 3326 Location: Paris - France
|
Posted: Wed May 19, 2010 12:01 pm Post subject: |
|
|
Va voir startssl. Tu peux avoir un certif SSL de base gratuit pour peut que tu peux prouver que tu gères le domaine concerné
Et il est reconnu par les gros navigateurs _________________ Merci de respecter les règles du forum.
Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing |
|
Back to top |
|
 |
|