保护我自己的管理面板
我需要一些方法来保护我自己的 php 管理面板。我在这里读到一些内容:
- 使用 apache2.conf 进行简单身份验证
- 使用 ssl 发送加密密码
- 在完全独立的域上托管工具
- 还应该使用适当的 robots.txt
- 当我想使用并执行 chmod 000 时使用 chmod 777我完成了
但是每个人都有问题。 如果我想用 apache2.conf 来做到这一点,我也必须使用 ssl。只有这样才安全吗?
如果我上传其他域中的工具并使用robots.txt“隐藏”它们,有人可以找到它们吗?
使用 chmod 就像“非专业”
您使用什么来保护您的管理面板?
I need ways to securize my own php administration panel. I read here about some:
- A simple authentication using apache2.conf
- Using ssl to send encrypted passwords
- Host the tools on a completely seperate domain
- A proper robots.txt should also be used
- Using chmod 777 when i want to use and do a chmod 000 when i finish
But eachone has problems.
If i want to do it with apache2.conf, i must use ssl too. Only with this is it secured?
If i upload the tools in other domain and use robots.txt to "hide" them, could someone find them?
Using chmod is like "non-professional"
What do you use to secure your administration panel?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有点像。如果您不使用 ssl,密码会通过网络以未加密的方式发送,如果有人监听您的通信,他们就会知道密码。话虽如此,除非参与方之一已经受到威胁,或者您正在通过不安全的介质(例如未加密的公共无线局域网)进行通信,否则别人通常不可能监听您与服务器的通信。
是的,如果他们猜出网址的话。 robots.txt 只是让您远离搜索引擎,但它并不能保护您的管理面板免受不必要的访问。
并且不安全。这意味着每当您在管理面板上工作时,其他人也可以。不要这样做。
使用 SSL 的 Apache 访问控制(通过全局配置或 .htaccess 文件)。一开始设置可能有点痛苦,但对于给定的问题,这确实是唯一有意义的选择。
Sort of. If you don't use ssl, passwords are sent over the net unencrypted if someone is listening in on your communication, they will know the password. That being said, it is usually impossible for someone to listen to your communication with the server unless one of the participating parties has already been compromised or you are communicating through an unsafe medium like unencrypted public wlan.
Yes, if they guess the URL. robots.txt just hides you from search engines, but it does not work for protecting your admin panel from unwanted access.
And unsafe. It means that whenever you are working on the admin panel, everyone else also can. Don't do this.
Access control with Apache (either through the global config or an .htaccess file) with SSL. It may be a bit painful to set up at first, but for the given problem, it really is the only choice that makes any sense.
您可以做的是使用需要您登录或注册您的网站的 php 类。您可以通过快速 Google 找到大量信息。
然后,您应该在您的网站上创建一个 API,仅在您通过身份验证后才发送回数据。下面是一个从 MySQL 数据库读取数据的示例:
请记住,上面的代码只是如何执行此类脚本的示例。您需要修改它才能与您正在使用的类和数据库一起使用。
现在,您可以制作自己的程序供自己内部使用,用于登录 API 并从中查询数据。这可以是在内部服务器、Windows 程序或智能手机应用程序上运行的网站。它需要做的就是填写登录网页上的表单,然后向上面的脚本发送 HTTP 请求并解码 json 结果。
What you could do is use a php class that requires you to log in or sign up to your Website. You can find plenty from a quick Google.
Then, you should make an API on your Website that only sends data back if you're authenticated. Here's an example that would read data from a MySQL database:
Remember that the above code is only an example of how you would do this sort of script. You'll need to modify it to work with the class and database you are using.
Now you can make your own program for your own internal use that logs in to and queries data from your API. This could be a Website running on an internal server, a Windows program or a smartphone app. All it would need to do is fill in the form on the log in Webpage, then send a HTTP request to the script above and decode the json result.