VirtualHost on VPS for subdomain using docker


Followed the set up at Xibo 1.8.9 with Docker on Ubuntu 16.04.

After creating /etc/apache2/conf.d/example.conf

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    ProxyPreserveHost On

    ProxyPass /
    ProxyPassReverse / return only the Index of/

Did I do something wrong here?


The guide you mention doesn’t say to create a file /etc/apache2/conf.d/example.conf

I presume you’re therefore trying to run this only on a particular hostname, and having other requests go elsewhere? In which case, you need to have a ServerName setting in there so that Apache can match requests to this.

If you just want all requests to go to Xibo, then go back to the guide and follow the instructions there (which tell you to edit /etc/apache2/sites-available/000-default.conf

Thanks Alex.

Proposed solution works well!