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

156
Vistas
Forwarding IP address to proper domain in Apache 2.4 / Centos 7

I want to forward any requests for my server public IP address to the domain. I have the following code near the top of the httpd.conf file. The numbers in the second line are the actual IP address of the server.

However, when I visit the IP address in my browser, (1.2.3.4 in this example case) the website comes up with the IP and no https. Why does this code below not forward the request to the domain with https?

If the user visits http:// or https://1.2.3.4 I want them to be redirected to https://www.example.com.

# Rewrite engine to move the raw IP address to URL
RewriteEngine On
RewriteCond %{HTTP_HOST} ^1\.2\.3\.4$
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
over 4 years ago · Santiago Trujillo
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