Hello every body. Hope all of you are healthy.
Playing around with Docker containers and web servers, I am facing a “challenge”.
I run Apache as web server in CentOS 8.
I have already set up many virtual hosts and they are running smoothly.
Additionally I have made entries with imaginary domain names in local /etc/hosts file and they are serving normally thanks to Apache names based virtual hosts.
Now I want to serve Docker containers instead of simple html pages.
All of them are accessible with Docker command -p 8080:80 and more over are accessible with imaginary domain names only if I add port on my web server. For example:
Nextcloud.net :8080.
Now I want to access them with our adding the port at the end.
I found the below code in git hub but is not working for me.
any help would be appreciated.
Playing around with Docker containers and web servers, I am facing a “challenge”.
I run Apache as web server in CentOS 8.
I have already set up many virtual hosts and they are running smoothly.
Additionally I have made entries with imaginary domain names in local /etc/hosts file and they are serving normally thanks to Apache names based virtual hosts.
Now I want to serve Docker containers instead of simple html pages.
All of them are accessible with Docker command -p 8080:80 and more over are accessible with imaginary domain names only if I add port on my web server. For example:
Nextcloud.net :8080.
Now I want to access them with our adding the port at the end.
I found the below code in git hub but is not working for me.
Code:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www
ServerName docker.example.com
ErrorLog logs/docker.example.com_error.log
CustomLog logs/docker.example.com_access.log combined
ProxyPreserveHost On
ProxyRequests off
<Location />
ProxyPass http://localhost:9000/
ProxyPassReverse http://localhost:9000/
Order allow,deny
Allow from all
</Location>
</VirtualHost>
any help would be appreciated.