我该如何保护我的WAMP所以只有本地主机可以访问根目录? [英] How do I secure my WAMP so only localhost can access root directory?

查看:96
本文介绍了我该如何保护我的WAMP所以只有本地主机可以访问根目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地安装我的WAMP配置,以便我可以告诉我的客户自己的网站,而他们在发展,但我要保护的根目录下,以便只有我才能访问它。

目前的情况是,任何人都可以简单地去域名和看到所有我工作的其他项目。

例如,我希望能够给我的客户访问: http://example.com/customer1但我不希望他们看到 http://example.com

我知道我必须配置东西在我的的httpd.conf 文件,但真的不知道该怎么做。

我希望这个解释正确。


解决方案

 拒绝来自所有
允许从本地主机127.0.0.1

这是因为我使用的Apache一段时间了,但是这应该这样做。

I've managed to setup my WAMP configuration so I can show my clients their websites while they're in development, but I want to secure the root directory so only I can access it.

As it stands now, anyone can simply go to the domain name and see all the other projects I'm working on.

For example, I want to be able to give my clients access to: http://example.com/customer1 but I don't want them to see http://example.com.

I know I have to configure something in my httpd.conf file but not really sure what to do.

Hope I explained this properly.

解决方案

Deny From All
Allow From localhost 127.0.0.1

It's some time since I used apache, but this should do it.

这篇关于我该如何保护我的WAMP所以只有本地主机可以访问根目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆