Apache2 Error Le sujet est résolu

Demande d'aide : c'est ici.
Répondre
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

Bonjour,

A la suite (je pense) d'une mauvaise manipulation avec lets encrypt (via un panel ISPCONFIG) mon apache ne fonctionne plus
Voici l'erreur.

Code : Tout sélectionner

root@SRVIS:/var/log/apache2# systemctl status apache2.service
â apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2017-10-12 10:18:32 CEST; 3min 44s ago
  Process: 22816 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 29888 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
  Process: 27559 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
 Main PID: 28112 (code=killed, signal=SEGV)

Oct 12 10:18:32 SRVIS systemd[1]: Starting The Apache HTTP Server...
Oct 12 10:18:32 SRVIS apachectl[27559]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:69
Oct 12 10:18:32 SRVIS apachectl[27559]: Action 'start' failed.
Oct 12 10:18:32 SRVIS apachectl[27559]: The Apache error log may have more information.
Oct 12 10:18:32 SRVIS systemd[1]: apache2.service: Control process exited, code=exited status=1
Oct 12 10:18:32 SRVIS systemd[1]: Failed to start The Apache HTTP Server.
Oct 12 10:18:32 SRVIS systemd[1]: apache2.service: Unit entered failed state.
Oct 12 10:18:32 SRVIS systemd[1]: apache2.service: Failed with result 'exit-code'.
Est-ce que vous arriez une pice pour m'aider à rétablire la situation et trouver l'origine du problème ?
Je reste à votre disposition pour toutes questions complémentaires.
Merci beaucoup
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

Code : Tout sélectionner

root@SRVIS:/# journalctl -xn
-- Logs begin at Mon 2017-10-02 22:14:46 CEST, end at Thu 2017-10-12 10:36:09 CEST. --
Oct 12 10:36:01 SRVIS CRON[6795]: pam_unix(cron:session): session closed for user root
Oct 12 10:36:02 SRVIS CRON[6794]: pam_unix(cron:session): session closed for user root
Oct 12 10:36:09 SRVIS systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit apache2.service has begun starting up.
Oct 12 10:36:09 SRVIS apachectl[7449]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:69
Oct 12 10:36:09 SRVIS apachectl[7449]: Action 'start' failed.
Oct 12 10:36:09 SRVIS apachectl[7449]: The Apache error log may have more information.
Oct 12 10:36:09 SRVIS systemd[1]: apache2.service: Control process exited, code=exited status=1
Oct 12 10:36:09 SRVIS systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Oct 12 10:36:09 SRVIS systemd[1]: apache2.service: Unit entered failed state.
Oct 12 10:36:09 SRVIS systemd[1]: apache2.service: Failed with result 'exit-code'.
root@SRVIS:/#
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

j'ai effectué un
a2dismod ssl
puis
a2enmodssl
reboot apache2 et là on dirait que ca passe...
Je n'arrive pas à me l'expliquer...
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

En fin de compte apache se lance, fonctionne quelques minutes, pui re-crash... Je ne comprends pas la cause :

Code : Tout sélectionner

root@SRVIS:/backup# systemctl status apache2.service
â apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2017-10-12 12:53:09 CEST; 37s ago
  Process: 18995 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 19233 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Oct 12 12:53:09 SRVIS systemd[1]: Starting The Apache HTTP Server...
Oct 12 12:53:09 SRVIS apachectl[19233]: AH00548: NameVirtualHost has no effect and will be removed in the next rel
Oct 12 12:53:09 SRVIS apachectl[19233]: Action 'start' failed.
Oct 12 12:53:09 SRVIS apachectl[19233]: The Apache error log may have more information.
Oct 12 12:53:09 SRVIS systemd[1]: apache2.service: Control process exited, code=exited status=1
Oct 12 12:53:09 SRVIS systemd[1]: Failed to start The Apache HTTP Server.
Oct 12 12:53:09 SRVIS systemd[1]: apache2.service: Unit entered failed state.
Oct 12 12:53:09 SRVIS systemd[1]: apache2.service: Failed with result 'exit-code'.
il n'y aucune précision sur le code d'erreur ou autre? Auriez vous une idée ?
Merci beaucoup
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

Code : Tout sélectionner

root@SRVIS:/backup# apache2ctl configtest
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:69
Syntax OK
root@SRVIS:/backup#
Avatar de l’utilisateur
lol
Site Admin
Site Admin
Messages : 4983
Inscription : 04 avr. 2016, 12:11
Localisation : Madagascar
Status : Hors-ligne

Salut,
ewkilian a écrit : 12 oct. 2017, 13:05

Code : Tout sélectionner

root@SRVIS:/backup# apache2ctl configtest
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:69
Syntax OK
root@SRVIS:/backup#

A priori la conf d'apache est ok.

Si tu nous expliquait maintenant un peu plus en détail ce que tu as fait... Et quelle est la configuration...

VM, Dédié, Autohébergé ?
Jessie, Stretch ? Version d'IspConfig ?
Debian à jour ? Version d'apache ?

Tu as fait les modif directement dans les fichiers de conf d'apache2 ou via l'interface d'Ispconfig ? Quelle est ton expérience: De Debian ? D'Ispconfig ?

N'oublie pas les logs d'apache (/var/log/apache2/error.log)
Règles d'usage du forum. Signalez si vous avez posté votre question sur un autre forum. Explications ici
Debian Unstable. Mate/LXQT. Dieu, en créant l'homme, a quelque peu surestimé ses capacités.
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

Merci d'avoir pris le temps de répondre.
En effet, j'ai un peu avancé, et je me suis rendu compte qu'il y avait un problème avec Lets Encrypt...
j'ai supprimé les fichiers dans /etc/apache2/site-enable et available des sites pour lesquels j'avais essayé de créer un certification, puis redémarré Apache et là tout fonctionne.

J'ai égalemement supprimé le site sur ISPCONFIG pour que ce soit propre.
Puis j'ai recréai un site, pour l'instant le certificat (via ispconfig) ne se crée plus. J'ai pu libre que lets encrypt ne fourni qu'un certificat par jour (1x demande /jour) (est-ce vrai ou non) je ne sais pas.
Ce que je sais c'est que tout est flou, et avant de m'avancer etc. Je préfère faire le point de ce qui fonctionne et ne fonctionne pas.

Info : serveur dédié avec Debian vers9 (à jour de qql jour) avec ISPConfig Version: 3.1.7 (OS et ISPCONFIG a jour)

Et voir.
Ok je vous enverrai les log error de apache (même si je n'avais malheureusement rien vu d'interessant)

Merci pour tout
A+
Avatar de l’utilisateur
lol
Site Admin
Site Admin
Messages : 4983
Inscription : 04 avr. 2016, 12:11
Localisation : Madagascar
Status : Hors-ligne

Salut,
Bienvenu sur le forum (au fait)!

Merci pour ce début de réponse qui éclairci un peu les choses.
J'utilise ispconfig depuis des années (J'ai 8 installations en production) je vois de quoi on parle c'est déjà ça...

1) Evite à tout prix de modifier les fichiers créés par ispconfig à la main (Tu risques de casser ispconfig et de toute façon les modification ne seront pas durables car ispconfig ré-écrira dessus: Les confs sont dans la base de donnée d'ispconfig)
2) Je n'ai jusqu'a présent pas utilisé la fonction letsencrypt proposée par ispconfig, sur ce point je ne pourrais pas t'aider... C'est relativement récent et à mon avis ce n'est pas encore tout à fait au point.
Éventuellement je te donnerais ma recette pour le faire "à la main" si ça t'intéresse.

Tu as combien de vhosts ? Ils sont tous en production ? Tu souhaite tous les passer tous en https ?

A+
Règles d'usage du forum. Signalez si vous avez posté votre question sur un autre forum. Explications ici
Debian Unstable. Mate/LXQT. Dieu, en créant l'homme, a quelque peu surestimé ses capacités.
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

Merci beaucoup, et surtout merci beaucoup de prendre de ton temps à répondre à mon problème.

Je suis content que tu utilises aussi ISPConfig, car je ne te cache pas qu’étant newbies dans tout cas, dans que tout roule ca va, mais dès lors qu’il y a un soucis, je galère un peu.

1) Je sais, et je m’en doute, mais le problème c’est que faire quand on accède meme plus à IPSCONFIG. Tu vois. Et avec cette solution ( de faire un MV sur les vhost sur lequel j’ai essayé de générer le certificat
2) C’est un nouveau serveur avec 2 sites, j’ai supprimé comme dit les 2 sites au niveau de ISPCONFIG, et j’en ai récréai un (pas encore refais le certificat). Au pire des cas, je ne peux une réinstallation complète. Je veux être certain que la base sur laquelle je vais héberger plusieurs sites soit « propre »

Par contre, je ne sais pas ce qui m’a pris ce matin, sur mon 2ème serveur, sur lequel j’héberge déjà plusieurs site en prod, j’ai voulu mettre en place un certificat, comme je le fais d’habitude, et là BOUM même problème. GRRR contre moi. Depuis la maj de Debian 8 + ISPCOJNFIG, je n’en n’avais pas créé, donc il y a bien un bug (avant ca fonctionnait) mais je ne sais pas à quel niveau. Par conséquent, pour que les sites refonctionnent j’ai déplacé le vhost du site pourlquel j'ai essaye de générer un certif de site-avalaible et enable et là plus d’erreur.

J’ai ouvert un post sur le forum de ISPCONFIG, ca c’est dommage de faire planter tout un système, qu’il n’y ait pas de vérification avant le « Submit »…

J’espère bien trouver une solution « propre ».

Ps : oui je compre mettre tous les sites en HTTPS
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

j'ai poussé le level des log apache au max et voici le résultat

Code : Tout sélectionner

[Fri Oct 13 15:49:23.657799 2017] [mpm_prefork:notice] [pid 30620] AH00169: caught SIGTERM, shutting down
[ 2017-10-13 15:49:24.7595 19481/7fe40c203740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.53', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.53', 'web_server_pid' => '19479', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2017-10-13 15:49:24.7622 19484/7fe079fa6740 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.19479/generation-0/request
[ 2017-10-13 15:49:24.7679 19491/7fcb4cd85780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.19479/generation-0/logging
[ 2017-10-13 15:49:24.7680 19481/7fe40c203740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
AH00016: Configuration Failed
[ 2017-10-13 15:50:38.5147 20417/7fe1efbed740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.53', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.53', 'web_server_pid' => '20415', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2017-10-13 15:50:38.5175 20420/7f9b68843740 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.20415/generation-0/request
[ 2017-10-13 15:50:38.5230 20427/7fea62018780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.20415/generation-0/logging
[ 2017-10-13 15:50:38.5232 20417/7fe1efbed740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Fri Oct 13 15:50:38.525099 2017] [ssl:warn] [pid 20415] AH01906: MyServer:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Oct 13 15:50:38.525307 2017] [ssl:warn] [pid 20415] AH01906: MyServer:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Oct 13 15:50:38.525339 2017] [ssl:error] [pid 20415] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=MyServer,OU=Informatique,O=Informatique,L=Bas-Rhin,ST=France,C=FR / issuer: CN=MyServer,OU=Informatique,O=Informatique,L=Bas-Rhin,ST=France,C=FR / serial: F1C96BE542F9C014 / notbefore: Nov 23 12:15:57 2016 GMT / notafter: Nov 21 12:15:57 2026 GMT]
[Fri Oct 13 15:50:38.525342 2017] [ssl:error] [pid 20415] AH02567: Unable to configure certificate MyServer:8080:0 for stapling
[Fri Oct 13 15:50:38.525507 2017] [ssl:warn] [pid 20415] AH01906: MyServer:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Oct 13 15:50:38.525560 2017] [suexec:notice] [pid 20415] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Fri Oct 13 15:50:38.546824 2017] [auth_digest:notice] [pid 20437] AH01757: generating secret for digest authentication ...
[Fri Oct 13 15:50:38.547270 2017] [:notice] [pid 20441] FastCGI: process manager initialized (pid 20441)
[ 2017-10-13 15:50:38.5498 20443/7fd919f06740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.53', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.53', 'web_server_pid' => '20437', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2017-10-13 15:50:38.5525 20446/7f3afa731740 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.20437/generation-0/request
[ 2017-10-13 15:50:38.5582 20453/7fb38fe91780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.20437/generation-0/logging
[ 2017-10-13 15:50:38.5583 20443/7fd919f06740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Fri Oct 13 15:50:38.576332 2017] [:error] [pid 20437] python_init: Python version mismatch, expected '2.7.5+', found '2.7.9'.
[Fri Oct 13 15:50:38.576376 2017] [:error] [pid 20437] python_init: Python executable found '/usr/bin/python'.
[Fri Oct 13 15:50:38.576379 2017] [:error] [pid 20437] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Fri Oct 13 15:50:38.576389 2017] [:notice] [pid 20437] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Fri Oct 13 15:50:38.576390 2017] [:notice] [pid 20437] mod_python: using mutex_directory /tmp 
[Fri Oct 13 15:50:38.583109 2017] [ssl:warn] [pid 20437] AH01906: MyServer:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Oct 13 15:50:38.583301 2017] [ssl:warn] [pid 20437] AH01906: MyServer:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Oct 13 15:50:38.583339 2017] [ssl:error] [pid 20437] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=MyServer,OU=Informatique,O=Informatique,L=Bas-Rhin,ST=France,C=FR / issuer: CN=MyServer,OU=Informatique,O=Informatique,L=Bas-Rhin,ST=France,C=FR / serial: F1C96BE542F9C014 / notbefore: Nov 23 12:15:57 2016 GMT / notafter: Nov 21 12:15:57 2026 GMT]
[Fri Oct 13 15:50:38.583342 2017] [ssl:error] [pid 20437] AH02567: Unable to configure certificate MyServer:8080:0 for stapling
[Fri Oct 13 15:50:38.583508 2017] [ssl:warn] [pid 20437] AH01906: MyServer:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Oct 13 15:50:38.586239 2017] [mpm_prefork:notice] [pid 20437] AH00163: Apache/2.4.10 (Debian) mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.9 Phusion_Passenger/4.0.53 mod_python/3.3.1 Python/2.7.9 OpenSSL/1.0.1t configured -- resuming normal operations
[Fri Oct 13 15:50:38.586253 2017] [core:notice] [pid 20437] AH00094: Command line: '/usr/sbin/apache2'
c'est bien un problème SSL. mais là il faut que j'étudie ca et que je comprenne...
a+
Avatar de l’utilisateur
lol
Site Admin
Site Admin
Messages : 4983
Inscription : 04 avr. 2016, 12:11
Localisation : Madagascar
Status : Hors-ligne

Hello,

Tu as bien fait d'ouvrir un topic sur le forum d'Ispconfig. Si tu as la chance d'avoir "Till" comme interlocuteur c'est bon!
J'irais voir ça.

Voici comment je procède de mon côté pour pas prendre de risque avec la génération automatique de certificats letsencrypt de Ispconfig:

1) Je crée le site
2) Je crée un certificat autosigné dans ispconfig
3) J'active HTTPS sur le site

4) Je génère un certificat manuellement avec certbot (letsencrypt)
5) Je backup les certificats autosignés ssl su site
6) Je crée un lien symbolique des certificats du site vers le répertoire letsencrypt (ainsi t'es pas emmerdé lors des renouvellements).

Code : Tout sélectionner

# cd /var/www/mondomaine.com
# mv ssl/mondomaine.com.crt ssl/mondomaine.com.crt.bak
# mv ssl/mondomaine.com.key ssl/mondomaine.com.key.bak
# ln -s /etc/letsencrypt/live/mondomaine.com/fullchain.pem ssl/mondomaine.com.crt
# ln -s /etc/letsencrypt/live/mondomaine.com/privkey.pem ssl/mondomaine.com.key
# ln -s /etc/letsencrypt/live/mondomaine.com/fullchain.pem ssl/mondomaine.com.bundle
# apachectl configtest
service apache2 force-reload
+ Une tâche cron pour le renouvellement automatique du certificat.

La seule chose à laquelle il faut faire attention, c'est de ne plus ouvrir l'onglet SSL des sites (car là tu risque d'écraser les liens symboliques...).
Règles d'usage du forum. Signalez si vous avez posté votre question sur un autre forum. Explications ici
Debian Unstable. Mate/LXQT. Dieu, en créant l'homme, a quelque peu surestimé ses capacités.
Avatar de l’utilisateur
lol
Site Admin
Site Admin
Messages : 4983
Inscription : 04 avr. 2016, 12:11
Localisation : Madagascar
Status : Hors-ligne

Re,
Comme le dit Till sur howtoforge Apache plantera si les vhosts ne trouvent pas les certificats ssl...
Tu peux nous montrer le contenu d'un vhost ?
Règles d'usage du forum. Signalez si vous avez posté votre question sur un autre forum. Explications ici
Debian Unstable. Mate/LXQT. Dieu, en créant l'homme, a quelque peu surestimé ses capacités.
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

Donc pour faire simple je faisais la bêtise suivante :
Coche SSL + LEts Encrypt (qui est suffisant d'apres TILL) + Création du certitfat via l'onglet SSL (mauvaise idées).
Je pense tout simplement que le certificat créé via l'onglet SSL fait tout planter. Maintenant je ne sais pas ce que je peux supprimer pour être "clean".
Dans /etc/apache2/sites-available je vois 2 fichiers concernant mon domaine corrompu
mondomaine.vhost et ferme-dollinger.alsace.vhost.err

Je te propose le fichier vhost (je pense qu'il faut que je modifie la partie "<IfModule mod_ssl.c>", je vais la comparer aux autre sites qui fonctionnent )

Code : Tout sélectionner

<Directory /var/www/mondomaine.alsace>
		AllowOverride None
				Require all denied
		</Directory>

<VirtualHost 10.20.30.40:80>

					DocumentRoot /var/www/clients/client1/web16/web
			
		ServerName mondomaine.alsace
		ServerAlias www.mondomaine.alsace
		ServerAdmin webmaster@mondomaine.alsace

		ErrorLog /var/log/ispconfig/httpd/mondomaine.alsace/error.log

		Alias /error/ "/var/www/mondomaine.alsace/web/error/"
		ErrorDocument 400 /error/400.html
		ErrorDocument 401 /error/401.html
		ErrorDocument 403 /error/403.html
		ErrorDocument 404 /error/404.html
		ErrorDocument 405 /error/405.html
		ErrorDocument 500 /error/500.html
		ErrorDocument 502 /error/502.html
		ErrorDocument 503 /error/503.html

		<IfModule mod_ssl.c>
		</IfModule>

		<Directory /var/www/mondomaine.alsace/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +FollowSymLinks
				AllowOverride All
								Require all granted
						</Directory>
		<Directory /var/www/clients/client1/web16/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +FollowSymLinks
				AllowOverride All
								Require all granted
						</Directory>




		# suexec enabled
		<IfModule mod_suexec.c>
			SuexecUserGroup web16 client1
		</IfModule>
		<IfModule mod_fastcgi.c>
				<Directory /var/www/clients/client1/web16/cgi-bin>
										Require all granted
								    </Directory>
				<Directory /var/www/mondomaine.alsace/web>
					<FilesMatch "\.php[345]?$">
						SetHandler php5-fcgi
					</FilesMatch>
				</Directory>
				<Directory /var/www/clients/client1/web16/web>
					<FilesMatch "\.php[345]?$">
						SetHandler php5-fcgi
					</FilesMatch>
				</Directory>
                Action php5-fcgi /php5-fcgi virtual
				Alias /php5-fcgi /var/www/clients/client1/web16/cgi-bin/php5-fcgi-10.20.30.40-80-mondomaine.alsace
                FastCgiExternalServer /var/www/clients/client1/web16/cgi-bin/php5-fcgi-10.20.30.40-80-mondomaine.alsace -idle-timeout 300 -socket /var/lib/php5-fpm/web16.sock -pass-header Authorization
		</IfModule>
		<IfModule mod_proxy_fcgi.c>
			#ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php5-fpm/web16.sock|fcgi://localhost//var/www/clients/client1/web16/web/$1
			<Directory /var/www/clients/client1/web16/web>
				<FilesMatch "\.php[345]?$">
						SetHandler "proxy:unix:/var/lib/php5-fpm/web16.sock|fcgi://localhost"
				</FilesMatch>
			</Directory>
			</IfModule>


		RewriteEngine on
		RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/
		RewriteRule ^ - [END]
		RewriteCond %{HTTP_HOST}   ^mondomaine\.alsace$ [NC]
				
		RewriteRule   ^/(.*)$ http://www.mondomaine.com/$1  [R=301,L]
	
		RewriteCond %{HTTP_HOST}   ^www\.mondomaine\.alsace$ [NC]
				
		RewriteRule   ^/(.*)$ http://www.mondomaine.com/$1  [R=301,L]
	

		# add support for apache mpm_itk
		<IfModule mpm_itk_module>
			AssignUserId web16 client1
		</IfModule>

		<IfModule mod_dav_fs.c>
		# Do not execute PHP files in webdav directory
			<Directory /var/www/clients/client1/web16/webdav>
				<ifModule mod_security2.c>
					SecRuleRemoveById 960015
					SecRuleRemoveById 960032
				</ifModule>
				<FilesMatch "\.ph(p3?|tml)$">
					SetHandler None
				</FilesMatch>
			</Directory>
			DavLockDB /var/www/clients/client1/web16/tmp/DavLock
			# DO NOT REMOVE THE COMMENTS!
			# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
			# WEBDAV END
		</IfModule>



</VirtualHost>


<VirtualHost 10.20.30.40:443>

					DocumentRoot /var/www/clients/client1/web16/web
			
		ServerName mondomaine.alsace
		ServerAlias www.mondomaine.alsace
		ServerAdmin webmaster@mondomaine.alsace

		ErrorLog /var/log/ispconfig/httpd/mondomaine.alsace/error.log

		Alias /error/ "/var/www/mondomaine.alsace/web/error/"
		ErrorDocument 400 /error/400.html
		ErrorDocument 401 /error/401.html
		ErrorDocument 403 /error/403.html
		ErrorDocument 404 /error/404.html
		ErrorDocument 405 /error/405.html
		ErrorDocument 500 /error/500.html
		ErrorDocument 502 /error/502.html
		ErrorDocument 503 /error/503.html

		<IfModule mod_ssl.c>
		SSLEngine on
		SSLProtocol All -SSLv2 -SSLv3
		# SSLCipherSuite          ABCDE-ECDSA-CHACHA20-POLY1305:ABCDE-RSA-CHACHA20-POLY1305:ABCDE-ECDSA-AES128-GCM-SHA256:ABCDE-RSA-AES128-GCM-SHA256:ABCDE-ECDSA-AES256-GCM-SHA384:ABCDE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ABCDE-ECDSA-AES128-SHA256:ABCDE-RSA-AES128-SHA256:ABCDE-ECDSA-AES128-SHA:ABCDE-RSA-AES256-SHA384:ABCDE-RSA-AES128-SHA:ABCDE-ECDSA-AES256-SHA384:ABCDE-ECDSA-AES256-SHA:ABCDE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ABCDE-ECDSA-DES-CBC3-SHA:ABCDE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
		SSLHonorCipherOrder     on
		# <IfModule mod_headers.c>
		# Header always add Strict-Transport-Security "max-age=15768000"
		# </IfModule>
		SSLCertificateFile /var/www/clients/client1/web16/ssl/mondomaine.alsace.crt
		SSLCertificateKeyFile /var/www/clients/client1/web16/ssl/mondomaine.alsace.key
				SSLCertificateChainFile /var/www/clients/client1/web16/ssl/mondomaine.alsace.bundle
						SSLUseStapling on
		SSLStaplingResponderTimeout 5
		SSLStaplingReturnResponderErrors off
				</IfModule>

		<Directory /var/www/mondomaine.alsace/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +FollowSymLinks
				AllowOverride All
								Require all granted
						</Directory>
		<Directory /var/www/clients/client1/web16/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +FollowSymLinks
				AllowOverride All
								Require all granted
						</Directory>




		# suexec enabled
		<IfModule mod_suexec.c>
			SuexecUserGroup web16 client1
		</IfModule>
		<IfModule mod_fastcgi.c>
				<Directory /var/www/clients/client1/web16/cgi-bin>
										Require all granted
								    </Directory>
				<Directory /var/www/mondomaine.alsace/web>
					<FilesMatch "\.php[345]?$">
						SetHandler php5-fcgi
					</FilesMatch>
				</Directory>
				<Directory /var/www/clients/client1/web16/web>
					<FilesMatch "\.php[345]?$">
						SetHandler php5-fcgi
					</FilesMatch>
				</Directory>
                Action php5-fcgi /php5-fcgi virtual
				Alias /php5-fcgi /var/www/clients/client1/web16/cgi-bin/php5-fcgi-10.20.30.40-443-mondomaine.alsace
                FastCgiExternalServer /var/www/clients/client1/web16/cgi-bin/php5-fcgi-10.20.30.40-443-mondomaine.alsace -idle-timeout 300 -socket /var/lib/php5-fpm/web16.sock -pass-header Authorization
		</IfModule>
		<IfModule mod_proxy_fcgi.c>
			#ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php5-fpm/web16.sock|fcgi://localhost//var/www/clients/client1/web16/web/$1
			<Directory /var/www/clients/client1/web16/web>
				<FilesMatch "\.php[345]?$">
						SetHandler "proxy:unix:/var/lib/php5-fpm/web16.sock|fcgi://localhost"
				</FilesMatch>
			</Directory>
			</IfModule>


		RewriteEngine on
		RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/
		RewriteRule ^ - [END]
		RewriteCond %{HTTP_HOST}   ^mondomaine\.alsace$ [NC]
				
		RewriteRule   ^/(.*)$ http://www.mondomaine.com/$1  [R=301,L]
	
		RewriteCond %{HTTP_HOST}   ^www\.mondomaine\.alsace$ [NC]
				
		RewriteRule   ^/(.*)$ http://www.mondomaine.com/$1  [R=301,L]
	

		# add support for apache mpm_itk
		<IfModule mpm_itk_module>
			AssignUserId web16 client1
		</IfModule>

		<IfModule mod_dav_fs.c>
		# Do not execute PHP files in webdav directory
			<Directory /var/www/clients/client1/web16/webdav>
				<ifModule mod_security2.c>
					SecRuleRemoveById 960015
					SecRuleRemoveById 960032
				</ifModule>
				<FilesMatch "\.ph(p3?|tml)$">
					SetHandler None
				</FilesMatch>
			</Directory>
			DavLockDB /var/www/clients/client1/web16/tmp/DavLock
			# DO NOT REMOVE THE COMMENTS!
			# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
			# WEBDAV END
		</IfModule>



</VirtualHost>

<IfModule mod_ssl.c>
        SSLStaplingCache shmcb:/var/run/ocsp(128000)
</IfModule>

Merci pour votre aide
A bientot
Avatar de l’utilisateur
lol
Site Admin
Site Admin
Messages : 4983
Inscription : 04 avr. 2016, 12:11
Localisation : Madagascar
Status : Hors-ligne

Salut,

Comme je le disais plus haut, ne pas créer un fichier vhost à la mano...
lol a écrit :1) Evite à tout prix de modifier les fichiers créés par ispconfig à la main (Tu risques de casser ispconfig et de toute façon les modification ne seront pas durables car ispconfig ré-écrira dessus: Les confs sont dans la base de donnée d'ispconfig)
Supprime le domaine dans ispconfig et recrée-len ce sera plus propre et tu évitera les mauvaises surprises "indemerdables".
Attention, si tu supprime dans ispconfig il efface TOUS les fichiers... Prend bien soin de faire une copie dans /var/backup par exemple.
Règles d'usage du forum. Signalez si vous avez posté votre question sur un autre forum. Explications ici
Debian Unstable. Mate/LXQT. Dieu, en créant l'homme, a quelque peu surestimé ses capacités.
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

salut
Oui je sais que je ne dois pas supprimer ou toucher à la mano pour ne pas désynchroniser la base isp avec le système. (mais là je n’avais pas le choix de supprimer le vhost en question car impossible d’accéder à l’interface ISP car crash de apache )
Sur ce compte, qui pose problème, j’ai des e-mails configurés  en prod. Heu…. Je me dis qu’il doit y avoir une solution pour « juste » régler le problème du certificat (heureusement sur ce compte le WWW n’est pas trop important).
Je vais rélfechir, et sinon tantpis, je casse le compte et refais.

Merci
A+
Avatar de l’utilisateur
lol
Site Admin
Site Admin
Messages : 4983
Inscription : 04 avr. 2016, 12:11
Localisation : Madagascar
Status : Hors-ligne

Salut,
ewkilian a écrit : 17 oct. 2017, 10:15 Sur ce compte, qui pose problème, j’ai des e-mails configurés  en prod. Heu…. Je me dis qu’il doit y avoir une solution pour « juste » régler le problème du certificat (heureusement sur ce compte le WWW n’est pas trop important).
Je vais rélfechir, et sinon tantpis, je casse le compte et refais.

Les noms de domaines des sites web ne sont pas liés avec les domaines configurés pour les mails dans ispconfig.
Tu peux sans soucis supprimer le site dans ispconfig, ça ne supprimera pas les comptes emails.

Image
Règles d'usage du forum. Signalez si vous avez posté votre question sur un autre forum. Explications ici
Debian Unstable. Mate/LXQT. Dieu, en créant l'homme, a quelque peu surestimé ses capacités.
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

ah bas oui, c'est vrai.
Je vais faire cela. Merci vraiment du temps que tu passes à me répondre.
(Je ne sais pas où tu habites, mais si tu habites près de Strasbourg, je te paye un bière ;) )
Avatar de l’utilisateur
lol
Site Admin
Site Admin
Messages : 4983
Inscription : 04 avr. 2016, 12:11
Localisation : Madagascar
Status : Hors-ligne

ewkilian a écrit : 17 oct. 2017, 13:19Je ne sais pas où tu habites, mais si tu habites près de Strasbourg, je te paye un bière ;)

Ce serait avec plaisir, mais...

Image


Mais je vais aller en boire une à ta santé de ce pas...  :drinks:
Règles d'usage du forum. Signalez si vous avez posté votre question sur un autre forum. Explications ici
Debian Unstable. Mate/LXQT. Dieu, en créant l'homme, a quelque peu surestimé ses capacités.
ewkilian
Membre
Membre
Messages : 80
Inscription : 12 oct. 2017, 10:27
Status : Hors-ligne

ah oui ca fait loin, même très loin !!!!!!! Tchin !
Avatar de l’utilisateur
lol
Site Admin
Site Admin
Messages : 4983
Inscription : 04 avr. 2016, 12:11
Localisation : Madagascar
Status : Hors-ligne

Salut,

On considère ton problème réglé ? Si oui, une petit coche verte ? Image


J'ai fais un essai sur une de mes installation, le letsencrypt de ispconfig a l'air de pas fonctionner.
J'active, je sauvegarde, ça tourne, et puis rien, le bouton letsencrypt est toujours décoché. Rien dans les logs de ispconfig, ça serait trop simple...
Je ré-essaierais plus tard!
Règles d'usage du forum. Signalez si vous avez posté votre question sur un autre forum. Explications ici
Debian Unstable. Mate/LXQT. Dieu, en créant l'homme, a quelque peu surestimé ses capacités.
Répondre