• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use wamp localhost in other device

#1
Hello
I cannot access to localhost(wamp) in my mobile
I try add ip to apache but i cannot use it
I search in google and find many topic about this problem but they are not helpful
Reply

#2
If you by wamp mean WampServer 3.0 or later, you activate the "online" feature this way:
1. Left-click => Apache => httpd-vhost.conf
2. Add "Require ip 192.168.0" or whatever your ip-range are to your virtualhost for CI. 

This example are for the document root (not recommended). You should have a virtualhost for CI and have your mobile access the ServerName instead.
Code:
<VirtualHost *:80>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot c:/wamp/www
    <Directory  "c:/wamp/www/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
        Require ip 192.168.0 #This is your ip-range
    </Directory>
</VirtualHost>
Reply

#3
(11-05-2017, 12:28 PM)jreklund Wrote: If you by wamp mean WampServer 3.0 or later, you activate the "online" feature this way:
1. Left-click => Apache => httpd-vhost.conf
2. Add "Require ip 192.168.0" or whatever your ip-range are to your virtualhost for CI. 

This example are for the document root (not recommended). You should have a virtualhost for CI and have your mobile access the ServerName instead.
Code:
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot c:/wamp/www
<Directory  "c:/wamp/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
Require ip 192.168.0 #This is your ip-range
</Directory>
</VirtualHost>

Thanks
Reply

#4
Do you know what "localhost" means?
Reply

#5
(11-07-2017, 08:54 AM)Narf Wrote: Do you know what "localhost" means?

Yes my home is localhost Confused
Reply

#6
(11-07-2017, 11:53 AM)omid_student Wrote:
(11-07-2017, 08:54 AM)Narf Wrote: Do you know what "localhost" means?

Yes my home is localhost  Confused

Yes, your home is localhost. But so is any office PC, smartphone and literally every network-capable computer device on the planet.

localhost means "this computer" and can only be accessed by itself. If you try to access "localhost" on your smartphone, it will access the smartphone, so of course it won't get to your PC.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.