Access website in local network through my Android phone

4

I made a site in PHP and MySQL responsive and would like to access it on my Android phone by localhost, I know I have to put my IP in the browser of the mobile phone but when I access it it appears the following error:

  

Forbidden You do not have permission to access / on this server.

    
asked by anonymous 10.12.2014 / 23:41

4 answers

9

WAMP Server

If you use WAMP Server , it's quite simple.

  • Click the WAMP icon in the Windows notifications area and click "Upload online":

-DiscovertheIPofyourcomputerinyournetwork.Todothis,openthecommandpromptandtypeipconfig.CopytheIPshortlyafter"IPv4 Address":

  • EntertheIPofyourcomputerinyourmobilebrowserandvoila.Youmayneedtoconfirmtherequestonyourcomputer'sfirewall:

XAMPP

In XAMPP, edit the file C:\xampp\apache\conf\extra\httpd-xampp.conf

Transform this:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Require local
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

In this:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    #Require local
    #ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

Then stay Apache with the XAMPP Control Panel. And test on the cell phone using the IP of the computer, as shown in the tutorial for WAMP.

    
10.01.2015 / 02:34
2

I've come across this error, and used Apache, and solved it as follows:

In the

  

bin \ apache \ apache.version.x \ conf \

open the file

  

link

search the line:

listen 80

And change it to:

listen 0.0.0.0:80

It worked for me, hope it works for you.

(I highlighted the text this way because bold was not working for me)

    
11.12.2014 / 01:38
1

To configure using linux:

1-open the terminal

2-use the command hostname -I

3-copy your ip on your phone, in my case: 10.0.0.10:8080.(8080 is the port that will be placed on the server, at your discretion).

4-Upload the com server in your folder with the command php -S 0.0.0.0:8080

This command works only in version greater than or equal to 5.4 +

    
26.05.2017 / 17:40
-1

You only need to use 2 features in your phone's browser:

  • Your IP Gateway (Not the local IP) ##
  • Your Apache port ##
  • For Windows:

    • Click the Start Menu button and access the Windows Search field. There, enter the "CMD" path to access the Command Prompt.
    • In the Prompt type ipconfig and press Enter.
    • You will receive as a return a list of various information, including your "Default Gateway".
    • Go to your AMP and copy the Apache port that is in use (8888 is recommended)
    • In your phone's browser enter your Gateway IP + port. Example: 192.148.16.236:8888
    • All localhost directories will be listed.

    For Mac:

    • Open the "System Preferences".
    • Click Networks and select the network for the current connection.
    • Copy the IP that appears in the upper right corner, this is your Gateway.
    • Go to your AMP and copy the Apache port that is in use (8888 is recommended)
    • In your phone's browser enter your Gateway IP + port. Example: 192.148.16.236:8888
    • All localhost directories will be listed.
    16.03.2016 / 18:25