Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

197
Visualizações
virtual host setup shows default apache2 page

I have setup a new virtual host on my ubuntu 16.04 machine but it redirects me to apache's default virtual host (which is disabled). Below is the contents of the apache virtual hosts config file;

VirtualHost configuration:

*:80 roomba.dev (/etc/apache2/sites-enabled/roomba.dev.conf:2)

*:443 is a NameVirtualHost

default server roomba.dev (/etc/apache2/sites-enabled/default-ssl.conf:2)

port 443 namevhost roomba.dev (/etc/apache2/sites-enabled/default-ssl.conf:2)

port 443 namevhost roomba.dev (/etc/apache2/sites-enabled/roomba.dev.conf:10)

ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33

the domain is https://roomba.dev

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You do not really have a question but based on the fact that I too am trying to setup a virtual host if not several, I have found a work around for the official Ubuntu virthost setup tutorial and the associated docs . They just do not work, see these comments and the confusion that ensued. I am assuming the were providing a clean way to add virtualhosts, similar to how you add APT lists in Linux.

Define your new virtual host in the default-ssl.conf file:

<IfModule mod_ssl.c>
  <VirtualHost _default_:443>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/html

...

  </VirtualHost>
</IfModule>

I hope that you did not delete it. After that first virtual host closing tag, add a new host as described in the tutorial instead of creating a new configuration file. For example;

<IfModule mod_ssl.c>
  <VirtualHost _default_:443>

...

  </VirtualHost>
  <VirtualHost *:80>
    #ServerAdmin admin@roomba.dev
    DocumentRoot /path/to/new/virtualhost
    ServerName roomba.dev
    ErrorLog ${APACHE_LOG_DIR}/roomba-error.log
    CustomLog ${APACHE_LOG_DIR}/roomba-access.log combined
   </VirtualHost>
</IfModule>

You can add as many as you want. I am still searching for documentation that could discourage this with explanations. As again, the Apache tutorial does not work but this does, yet they bothered to write it that way, several times. There must be a reason why.

NB: do not touch any permissions. Except the original virtual server directories, based on the http error codes.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda