I’m starting to use Docker and i want separate some projects in different containers.
I started create a container with this:
docker run -i -t -p 8080:80 --name apache-php --link postgresdb:postgresdb --link mysqldb:mysqldb -v /home/volumes/html:/var/www/html php:5.6-apache /bin/bash
I followed these steps to create a “Name-based Virtual Hosts”: https://www.linode.com/docs/websites/hosting-a-website and works fine
If i access my domain, eg: example.com:8080 the page opens, but if i access with example.com, the page doesn’t open
After read some tutorials, i tried use proxy in example.com.conf:
# domain: example.com
# public: /var/www/html/example.com/public_html/
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias example.com www.example.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /var/www/html/example.com/public_html
# Log file locations
LogLevel warn
ErrorLog /var/www/html/example.com/log/error.log
CustomLog /var/www/html/example.com/log/access.log combined
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPass / http://www.example.com:8080
</VirtualHost>
But doesn’t work yet =/
How can i point my domain to specific container?