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

231
Vistas
Access correct website file from apache web server

I am running an apache web server on my Raspberry Pi that hosts a website. To get the IP address of the server i used ifconfig and looked for the inet address under wlan0. I typed this address into chromium and reached /var/www/html/index.html. I do not want to reach this file, instead i was hoping to configure the server so that the first site i reach is /var/www/test/index.php.

How can i achieve this?

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

0

First, you need to change the document root of apache to point to the /var/www/test directory.

For this I advise you to follow this explanation : https://askubuntu.com/a/738527

And then normally you will be able to access your page from other computers using the IP address of your PI.

over 4 years ago · Santiago Trujillo Denunciar

0

If you only have one webpage running on the Pi, you need to change the document root of the apache.

A better solution is, to use virtual hosts with apache. Depending on the OS on the Pi there may be different paths for the Apache config files. I only know it for Debian (Raspbian).

Then you have to enable the virtual host (a2ensite <configfile.conf>) and reload or restart Apache.

If you are running a local Nameserver (like PiHole), you have to add the correct DNS entry for this virtual host. Or if you don't have a local DNS you have to edit the /etc/hosts files on all machines you want to have access to this website. (There is also a hosts file on windows (i think it is in \Windows\System32\drivers\etc)

Thats it :-)

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