Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 26/09/2025, à 10:09

Sebastien31T

Impossible d'acceder à mon site

Bonjour je possede actuellement dux site quasi similaire mais je suis toujours rediriger sur le meme site l'autre site se met en erreur 500
voici la config du site qui fonctionne:

<IfModule mod_ssl.c>
<VirtualHost *:443>
        # 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 gestionnel.fr
        ServerAlias *gestionnel.fr

        ServerAdmin contact@obierti.fr
        DocumentRoot /srv/web/gestionnel/public

        <Directory /srv/web/gestionnel/public>
                AllowOverride All
                Options  FollowSymLinks
                Require all granted
        </Directory>

        <Location "/srv/web/gestionnel/public/compta/">
                AuthName "Privé"
                AuthType Basic
                AuthBasicProvider file
                AuthUserFile /srv/web/gestionnel/public/compta/.htpasswd
                Require valid-user
        </Location>

        # 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


SSLCertificateFile /etc/letsencrypt/live/gestionnel.fr/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/gestionnel.fr/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

et celui qui ne fonctionne pas :

<IfModule mod_ssl.c>
<VirtualHost *:443>
        # 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 gestionnel.com
        ServerAlias *gestionnel.com

        ServerAdmin contact@obierti.fr
        DocumentRoot /srv/web/gestionnelc/public

        <Directory /srv/web/gestionnelc/public>
                AllowOverride none
                Options Indexes FollowSymLinks
                Require all granted
        </Directory>

        # 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

RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteCond %{SERVER_NAME} =gestionnel.fr [OR]
# RewriteCond %{SERVER_NAME} =*gestionnel.fr
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Redirect "/" "https://gestionnel.fr/"

SSLCertificateFile /etc/letsencrypt/live/gestionnel.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/gestionnel.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

pour plus d 'information me demander . merci d'avance bonne journée


Modération - Utilise ton autre compte sebastien31 (voir https://forum.ubuntu-fr.org/viewtopic.php?id=2092623)

Dernière modification par cqfd93 (Le 26/09/2025, à 21:04)

Hors ligne