Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

300
Vistas
Regex in If condition in apache configuration (let's encrypt configuration for renewal certificate)

I am trying to make the certificate renewal work. I guess with the new version, let's encrypt will look on http://[mondomain]/.well-known/acme-challenge/....

So, in my apache configurations, on my virtual host of port 80, I wanted to put a regex which when the .well-known exists in the URI, I do not redirect my virtualhost https so that let's encrypt can make your challenge (I tested and my certificate is well renewed when I deleted all redirects).

I specify that the directory /var/www/html/.well-known/acme-challenge exists on the apache server and that my DNS is with DNS provider.

I don't understand why my regex is not working.

Can you help me please ?

Here is the apache configuration.

<VirtualHost *:80>

    ServerName [Domain]
    ServerAlias [DomainWWW]
    DocumentRoot /var/www/html
    #Alias "/.well-known/acme-challenge/" "/var/www/html/.well-known/acme-challenge/
    #RewriteEngine on
    #RewriteCond %{HTTPS} !on
    #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}



    <If "%{REQUEST_URI} !~ m#\.well-known\/acme-challenge\/.*m#">
       RewriteEngine on
       RewriteCond %{HTTPS} on
       RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    </If>



</VirtualHost>

Thank you in advance.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The regex was OK . I was able to renew certificate. That's good now ! :)

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda