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

224
Views
¿Cómo alojar múltiples hosts virtuales desde la misma dirección IP en el servidor Apache sobre AWS?

Quiero alojar dos paneles angulares diferentes sobre Apache (AWS). Así que deshabilité el archivo predeterminado 000-default.conf en etc/apache2/sites-available usando a2dissite 000-default.conf e hice dos archivos webAdmin.conf y webUIpanel.conf . Ahora mi webAdmin.conf tiene la siguiente configuración

 <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html/AngularProjects/getItHomeNow_UI/dist ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

y webUIpanel.conf tiene lo siguiente

 <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html/AngularProjects/getItHomeNow_UserPanel/dist ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

Luego usé a2ensite para habilitar ambos archivos de configuración y, por último sudo systemctl restart apache2 . Pero uno de ellos trabajando a la vez. Necesito deshabilitar uno para que el otro funcione. Amablemente sugiérame ¿dónde me equivoqué?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Debe agregar ServerName en su configuración de VirtualHost para que Apache pueda decidir qué sitio debe recibir la solicitud. Entonces, para aplicar eso a su configuración, debería verse así:

webAdmin.conf

 <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html/AngularProjects/getItHomeNow_UI/dist ServerName www.example1.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

y webUIpanel.conf tiene lo siguiente

 <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html/AngularProjects/getItHomeNow_UserPanel/dist ServerName www.example2.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

NOTA: Ambos ServerName deben ser dominios válidos para que se resuelvan en su servidor o usen su /etc/hosts para apuntarlos a la IP de su servidor.

over 4 years ago · Santiago Trujillo Report
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!