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>

<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>

<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
</VirtualHost>
  • 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 192.168.0.103 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


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: