简体   繁体   中英

I want to access the files in htdocs on my smartphone inside the same network

I am developing in php and I have mysql as backend, on a windows 7 machine. I have installed xampp server and i'm using apache 2.4 as the web server. I have a mtnl router and all my devices are connected to it. I want to access everything which is present in the htdocs folder on my android smartphone. I saw some posts about editing httpd.conf file but no use. Please specify what to edit in the conf file.

Thanks in advance!

my ip-config o/p is:

Wireless LAN adapter Wireless Network Connection:
       Connection-specific DNS Suffix:
       Link-local IPv6 Address: fe80::853e:7ced:1b5e:91cc%12
       IPv4 Address: 192.168.1.103
       Subnet Mask : 255.255.255.0
       Default Gateway:192.168.1.1

my httpd.conf file ka edits looks like this:

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 :: 192.168.1
    Allow from 127.0.0.1
Allow from 192.168.1

**SOLUTION FOUND:**

As #BenH said we have to edit the httpd.conf as he's shown

Goto firewall and add apache server to the exception list

to setup a static ip go to network and sharing and open adapter settings,

select current connected adapter rightclick and click on the properties

click on ipv4 properties click on the use the following ip address

ur ip address: 192.168.1.xyz

xyz can be anything from 02 to 255

subnet mask:255.255.255.0

default gateway: 192.168.1.1

for mtnl preferred dns server in mumbai is :59.185.0.23

alt:203.94.227.70 click ok

restart the apache

Thank u everyone especially BenH for helping me out :)

尝试关闭防火墙。

Set static IP to each devices on your local network. Then you'll have to configure apache to allow connection from all and not only from 127.0.0.1, it should be in httpd.conf :

AllowOverride All
Order Deny,Allow
Deny from all
Allow from all

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM