VirtualTam's bookmarks
4 bookmarks found
Page 1 of 1
-
TL;DR: docker0 bridge + iptables
- https://stackoverflow.com/questions/31324981/how-to-access-host-port-from-docker-container
- https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach
- https://stackoverflow.com/questions/29598504/how-to-connect-to-service-in-the-host-machine-from-inside-a-docker-container
- http://blog.michaelhamrah.com/2014/06/accessing-the-docker-host-server-within-a-container/
-
Pro: no need to setup a DNS server to test virtualhosts Con: keep in mind that all "fake" hosts will point to 127.0.0.1!
- Use /etc/hosts to declare test hosts / domains / subdomains
#<ip-address> <hostname.domain.org> <hostname> 127.0.0.1 localhost.localdomain localhost 127.0.0.1 host.localdomain host 127.0.0.1 sub.host.localdomain sub.host ::1 localhost.localdomain localhost
- Allow per-user virtualhost definition in either (depending on your distro)
/etc/httpd/conf/httpd.conf
/etc/apache2/apache2.conf
Include
/home/albert/.httpd/*.conf
- Profit! Create virtualhosts with local hostnames :)
Page 1 of 1