Local WP website doesn’t load on iPhone using a proxy + virtual host

I’m trying to get my local virtual host websites to open on my iPhone and so far I’m having trouble only with WordPress. All other websites work fine. Here is my setup:

  • On my iPhone I have enabled a proxy using my desktop PC IP address and port 80.
  • Here are some of my vhosts file settings:


<VirtualHost *:80>
ServerName localhost
DocumentRoot /Users/user/Documents/
<VirtualHost *:80>
    ServerAdmin webmaster@wordpress.dev
    DocumentRoot "/Users/user/Documents/wordpress/"
    ServerName wordpress.dev
    ServerAlias www.wordpress.dev
    ErrorLog "/private/var/log/apache2/wordpress.dev-error_log"
    CustomLog "/private/var/log/apache2/wordpress.dev-access_log" common
<VirtualHost *:80>
    ServerAdmin webmaster@companywebsite.dev
    DocumentRoot "/Users/user/Documents/companywebsite/dev/"
    ServerName companywebsite.dev
    ServerAlias www.companywebsite.dev
    ErrorLog "/private/var/log/apache2/companywebsite.dev-error_log"
    CustomLog "/private/var/log/apache2/companywebsite.dev-access_log" common
  • From the above example, companywebsite.dev opens fine on my iPhone, but when I type wordpress.dev it gets replaced with wordpress.devhttp/wordpress.dev/ and I’m getting this error:

    Not Found The Requested URL /wordpress.dev/ was not found on the server.

  • When I manually navigate to the “wordpress” folder from the localhost root and I open it, the browser loads forever.
  • Everything is working properly on desktop.

What I tried so far:

  • Disabled the proxy on my iPhone, entered and navigated to the wordpress folder – browser still loads forever

Read more here: Local WP website doesn’t load on iPhone using a proxy + virtual host

Leave a Reply

Your email address will not be published. Required fields are marked *