【httpd】如何通过 配置 httpd.conf 在服务端保护受访问的资源

    xiaoxiao2024-12-17  57

    The following GET request tried to access a protected resource. The server returns an error "403 Forbidden". In this example, the directory "htdocs\forbidden" is configured to deny all access in the Apache HTTP server configuration file "httpd.conf" as follows:

    <Directory "C:/apache/htdocs/forbidden"> Order deny,allow deny from all </Directory> GET /forbidden/index.html HTTP/1.0 (blank line) HTTP/1.1 403 Forbidden Date: Sun, 18 Oct 2009 11:58:41 GMT Server: Apache/2.2.14 (Win32) Content-Length: 222 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access /forbidden/index.html on this server.</p> </body></html>
    最新回复(0)