问题描述
我主持的一台计算机作为服务器我的文件,但我想从另一台计算机访问lan.By访问我的意思是编辑根(WWW)目录下的文件和phpMyAdmin的,并打开他们看到并更改数据库,code.How这可能吗?
I have my files hosted on one computer acting as the server , but I want to access the root (www) directory files and the phpmyadmin from another computer on the lan.By access I mean to edit them and open them to see and make changes to the database and code.How is it possible?
推荐答案
默认情况下WAMPServer被配置为一个独立的开发系统,为您的工作站上运行。
By default WAMPServer is configured to be a standalone development system for running on your workstation.
如果你想在一台PC上运行WAMP从另一个访问它,你必须改变Apache的安全配置。
If you want to run Wamp on one PC and access it from another you have to change the Apache security configuration.
您不提什么样WampServer的版本正在运行,所以我想我会记录这两个选项很有用。
You dont mention anything useful like the version of WampServer you are running so I guess I will have to document both options
修改httpd.conf文件(使用wampmanager菜单)
Edit httpd.conf ( using the wampmanager menus )
如果Apache 2.2.x的
找到这一节,我已经删除简便起见,所有的意见。
Locate this section, I have remove all the comments for the sake of brevity.
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
更改为:
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1 localhost
## Add an ip range that matches your routers first 3 quartiles
## So if your router subnet is 192.168.0 ( use ipconfig to find out what your router is set to )
## This will allow any PC on your internal network to access the www folder and subfolders
Allow from 192.168.0
## Or you can specify a specific ip or set of ip's like this
## Allow from 192.168.0.10 192.168.0.11 192.168.0.12 ....
</Directory>
如果Apache 2.4.x的
发现这个栏目
If Apache 2.4.xFind this section
<Directory "c:/wamp/www">
Options Indexes FollowSymLinks
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - do not remove
Require local
</Directory>
更改为:
<Directory "c:/wamp/www">
Options Indexes FollowSymLinks
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - do not remove
Require local
Require ip 192.168.0
## Apply the same logic as above for specific ip's or a set of ip's
## i.e. Require ip 192.168.0.10 192.168.0.11 .....
</Directory>
现在来获得访问phpMyAdmin你必须编辑这个配置文件
Now to gain access to phpMyAdmin you have to edit this config file
编辑C:\\ WAMP \\别名\\ phpmyadmin.conf
Edit C:\wamp\alias\phpmyadmin.conf
您需要做相同的排序chnage在这里如同上面一样。
You need to make the same sort of chnage in here as you did above
的Apache 2.2.x的
改变这种
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1
</Directory>
要
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1
Allow from 192.168.0
</Directory>
阿帕奇2.4.x的
Apache 2.4.x
更改此
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require local
</Directory>
要
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require local
Require ip 192.168.0
</Directory>
如果你可以遵循一切,你应该能够从您的内部网络访问您的网站和phpmyadmin的。
If you can follow all that you should be able to access your site and phpmyadmin from your internal lan.
至于编辑网站的源代码,你将有机会分享到C:\\ WAMP \\你的服务器上,然后映射您正在使用的PC上共享www文件夹
As to editing the source of your site, you will have to share the c:\wamp\www folder on your server and then map that share on the PC you are working on.
这篇关于从局域网的另一台计算机在访问网站WAMP文件和phpMyAdmin的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!