5/29/2023 0 Comments Squidman setupLet me know if you need any clarification on any step in particular. # put IP address of your computer instead COMPUTER_IPįor more about dnsmasq config see manpage.Took a bit of playing around to get it to work, but this is what worked for me. # use DNS server 8.8.8.8 for all except abc.dev # Never forward addresses in the non-routed address spaces. # Never forward plain names (without a dot or domain part) Put IP address of your computer instead COMPUTER_IP.ĭirectory structure with your docker-compose.yml: docker-compose.ymlĭnsmasq/dockerfile FROM andyshinn/dnsmasqĬOPY dnsmasq/nf /etc/nfĭnsmasq/nf # default dnsmasq config file To try this, add these files to your docker-compose project.ĭnsmasq/nf is working config file, but you need to change last line: Setup your COMPUTER_IP as DNS server in your phone.Deploy your DNS server with docker-compose together with wordpress.This way your phone will ask noip for IP of it answers your COMPUTER_IP and browser connect to your computer. This one does not use abc.dev, but something what online services offers, for example on you can register something like, then setup COMPUTER_IP as IP for that domain. ![]() ![]() Second possible solution, use online DNS service: Add custom DNS entry in your home router to point abc.dev to your computer home network IP address. If your home router can add static DNS entries. One possible solution, use existing DNS server at home: ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6īut for phones it is not easy to rule custom DNS records because of security reasons. etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 Another Windows/Mac/Linux only need to add domain entry into hosts file. Your localhost computer knows abc.dev and resolve it to localhost.īut this is not true for anothers hosts in home network. You should be able to connect to website from your phone to IP of your computer If your are not able load website, check firewall. Really appreciate for all assistance and pointers.Īt first make sure your problem is only DNS. I'm sure Squid, Mitmproxy and some other tools out there can help me with this. I found CharlesProxy but I'm not into it because it's a paid software. Plus, I want my setup to look and behave as close as my production website which is running using the same URL structure. or because it's working fine on my machine. I don't want to change the WP Site URL setting to other URL i.e. Set up Ubuntu 18 Server VM on top my machine (OSX) using VirtualBox, install Mitmproxy, run Mitmproxy, configure host (OSX) and phone to use that Ubuntu 18 Server as proxyĪll of the steps above didn't work for me and I'm out of idea how to make this setup works for me.Install and trust Mitmproxy cert in my phone.Some of the things that I've tried in general: My problem right now, I want to access the WP site on my phone and I want the URL to be as well in the phone.įor the past few days, I've been messing around with Squid proxy and Mitmproxy and didn't find any luck. So, by doing that, it helped me with port conflicts problem. The main reason why I open wordpress port at 8080 was because Caddy wanted 80 and 443 ports to be opened. The tree structure looks like this: ├── Caddyfile Tls /var/caddy/cert.pem /var/caddy/key.pem ![]() ![]() '-default_authentication_plugin=mysql_native_password', theme-name/trunk/:/var/www/html/wp-content/themes/theme-name # Theme development plugin-name/trunk/:/var/www/html/wp-content/plugins/plugin-name # Plugin development wp-app:/var/www/html # Full wordpress project config/:/usr/local/etc/php/conf.d/uploads.ini This is how my docker-compose.yml file for that WP looks like: version: '2' I've imported the self-signed cert into OSX Keychain Access and marked it Always Trust. I obtained the self-signed cert from this website. The WP site running on port 443 and I'm using a self-signed certificate to make it work. The WP Site URL setting is set to and I can access the site without any problem on my machine's browser. I have a WordPress (WP) blog running locally on my machine (OSX).
0 Comments
Leave a Reply. |