Bonjour à tous,

J'ai un problème avec mes virtualhost.

J'aurais besoin de votre aide je suis bloqué s'il vous plaît?

J'ai un serveur sous debian avec en dossier
html
pu

pu est un site wordpress.
J'ai deux virtualhost un pour l'ip et un pour le nom de domaine qui ne fonctionne pas et que je voudrais qui redirige vers pu mais il reste dans html
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        ServerName planete-urgence.org
        Redirect permanent / https://planete-urgence.org/
 
        ServerAlias *planete-urgence.org
 
        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn
 
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
 
        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>
 
<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/pu
        ServerName planete-urgence.org.https
        ServerAlias *planete-urgence.org
        <Directory "/var/www/html/pu">
            AllowOverride All
            Options -Indexes +FollowSymLinks
            AddDefaultCharset UTF-8
        </Directory>
         SSLEngine on
        SSLCertificateFile /etc/ssl/localcerts/apache.pem
        SSLCertificateKeyFile /etc/ssl/localcerts/apache.key
</VirtualHost>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<VirtualHost 54.38.181.29:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	ServerName 54.38.181.29
	DocumentRoot "/var/www/html/"
 
	ServerAlias  *54.38.181.29
	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn
 
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
 
	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
 
<VirtualHost 54.38.181.29:443>
	ServerAdmin webmaster@localhost
	LogLevel debug
	DocumentRoot /var/www/html
	ServerName 54.38.181.29
        <Directory "/var/www/html/pu">
            AllowOverride All
            Options -Indexes +FollowSymLinks
	    AddDefaultCharset UTF-8        
	</Directory>
	ServerAlias *54.38.181.29
        SSLEngine on
	SSLCertificateFile /etc/ssl/localcerts/apache.pem
	SSLCertificateKeyFile /etc/ssl/localcerts/apache.key
 </VirtualHost>
Le soucis c'est que quand j'entre https://planete-urgence.org/ je suis dans html et pas pu.
Et si je rajoute pu cela m'est https://planete-urgence.org/pu alors cela me utilise l'ip.

Je veux juste https://planete-urgence.org/ utilise le dossier pu et pas html merci de votre aide.

Merci