Reverse Port Forwarding is fun in Mobile Web Development. It gives us access to
localhost from Mobile and Tablet device. Is not this a fun?
The only thing we need to do is to use four digit port number as
8081 etc. So, instead of
http://localhost/index.php, now we need to use something like this:
For using 4 digit port number create virtual host on your development environment. or setup Apache to use different port than 80. I think, to change port for all, just change
Listen 80 to
Listen 8080, etc in
We need to follow steps written here for ChromeDev Tools for enabling Reverse Port Forwarding. I saw that
127.0.0.1 was not working on mobile device for some reason. So, I need to give
localhost:8081. 8081 is the port I used. After first use, when I clicked on link which leads to
127.0.0.1:8081, then also it stopped working but in next try it started working as 127.0.0.1 as well. Little strange but good one.
One more thing, many people switch off Wi-Fi when using Chrome Dev. I also tried with that. Later when one image which was coming from web was not showing up and I want to see the post with that, so I enabled wi-fi when reverse port forwarding was working then wi-fi has not created any problem.