Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

488
Views
¿Cómo configurar correctamente DocumentRoot principal de apache?

Soy nuevo con Linux y servidores VPS en general, pero ahora estoy aprendiendo a través de la creación de un sitio web que se ejecuta en un servidor VPS. Todo lo demás funciona sin problemas, pero cuando intento acceder a mi sitio desde mi teléfono (o el teléfono de un amigo no importa), intenta cargar contenido desde el directorio /var/www/html aunque mi sitio está ubicado en home/sitename/public_html . Desde el escritorio funciona bien y no da ningún error.

En sites-disponible/mysite.conf todo parece estar bien y DocumentRoot apunta correctamente a home/sitename/public_html. pero cuando corro

 apache2ctl -S

me da esto:

 VirtualHost configuration: 1.1.1.1:80 mysite.com (/etc/apache2/sites-enabled/mysite.com.conf:1) 1.1.1.1:443 mysite.com (/etc/apache2/sites-enabled/mysite.com.conf:40) ServerRoot: "/etc/apache2" Main DocumentRoot: "/var/www/html" Main ErrorLog: "/var/log/apache2/error.log" Mutex authdigest-opaque: using_defaults Mutex watchdog-callback: using_defaults Mutex proxy-balancer-shm: using_defaults Mutex rewrite-map: using_defaults Mutex ssl-stapling-refresh: using_defaults Mutex authdigest-client: using_defaults Mutex fcgid-proctbl: using_defaults Mutex ssl-stapling: using_defaults Mutex proxy: using_defaults Mutex ssl-cache: using_defaults Mutex default: dir="/var/run/apache2/" mechanism=default Mutex mpm-accept: using_defaults Mutex fcgid-pipe: using_defaults PidFile: "/var/run/apache2/apache2.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG Define: ENABLE_USR_LIB_CGI_BIN User: name="www-data" id=33 Group: name="www-data" id=33

Desde aquí podemos ver que el DocumentRoot principal es "/var/www/html/" en lugar del correcto antes mencionado. ¿Es esta la razón por la que no puedo acceder correctamente a mis sitios desde mi teléfono y cómo podría solucionarse? He intentado todo lo que pude encontrar en Google y sí, he purgado mi caché siempre después de los cambios, pero no con éxito. Realmente agradecería ayuda.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!