Skip to content

Instantly share code, notes, and snippets.

@vik-y
Created December 20, 2017 12:26
Show Gist options
  • Save vik-y/dba82203730320522f0a493420558b37 to your computer and use it in GitHub Desktop.
Save vik-y/dba82203730320522f0a493420558b37 to your computer and use it in GitHub Desktop.
Docker config on my local machine
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ProxyPass / http://localhost:8082/
ProxyPassReverse / http://localhost:8082/
ProxyPreserveHost On
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# Run automated reverse proxy at 8082
docker run -d --restart always -p 8082:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy

# Modify 000-default.conf as mentioned in the above file to reverse proxy all requests to 8082 
<VirtualHost *:80>
ServerName phpmyadmin.localhost.com
ServerAlias phpmyadmin.localhost.com
DocumentRoot /usr/share/phpmyadmin
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment