VirtualHost on VPS for subdomain using docker

Hi,

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 / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/

subdomain.example.com.sg return only the Index of/

Did I do something wrong here?

Thanks.

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.

https://httpd.apache.org/docs/2.4/vhosts/name-based.html

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!