我发现 Apache 存在一个奇怪的问题
我有一个从 Web 服务器提取配置文件的系统。我想使用名为“ocds-dpsarch01a.rules”的符号链接。这不起作用。但是,如果我更改该名称中的一个字符并将其链接到同一个文件,它就可以正常工作 - 见下文
我想不出为什么一个符号链接可以工作而另一个符号链接却不行?我原以为要么是 Apache 配置正确,所有符号链接都工作,要么是 Apache 配置不正确,所有系统链接都不起作用(?)
欢迎任何想法
# ls -l /REMOVED/apache2/htdocs/rules/syslog/*cds-dpsarch01a.rules
lrwxrwxrwx 1 root root 62 May 13 13:55 ocds-dpsarch01a.rules -> /REMOVED/apache2/htdocs/templates/syslog/DCM_SST_DPST_01.rules
lrwxrwxrwx 1 root root 62 May 13 13:52 xcds-dpsarch01a.rules -> /REMOVED/apache2/htdocs/templates/syslog/DCM_SST_DPST_01.rules
1)应用程序启动并成功从 Web 服务器读取配置
13/05/2010 13:56:37: Information: Connecting ...
13/05/2010 13:56:37: Debug: Reading REMOVED:// REMOVED /rules/syslog/xcds-dpsarch01a.rules
13/05/2010 13:56:37: Debug: HTTP response: HTTP/1.1 200 OK
Date: Thu, 13 May 2010 13:56:34 GMT
Server: Apache
Last-Modified: Fri, 09 Apr 2010 12:28:26 GMT
ETag: "5073-a744-ee92ae80"
Accept-Ranges: bytes
Content-Length: 42820
Cache-Control: max-age=5
Expires: Thu, 13 May 2010 13:56:39 GMT
NL7C-Filtered:
Content-Type: text/plain
Connection: close
13/05/2010 13:56:37: Debug: Plain text rules file detected.
2)应用程序启动但无法从 Web 服务器读取配置
13/05/2010 13:56:55: Information: Connecting ...
13/05/2010 13:56:55: Debug: Reading REMOVED :// REMOVED /rules/syslog/ocds-dpsarch01a.rules
13/05/2010 13:56:55: Debug: HTTP response: HTTP/1.1 403 Forbidden
Date: Wed, 12 May 2010 15:25:11 GMT
Server: Apache
Vary: accept-language,accept-charset
Accept-Ranges: bytes
Connection: close
Content-Type: text/html; charset=iso-8859-1
Content-Language: en
Expires: Wed, 12 May 2010 15:25:11 GMT
13/05/2010 13:56:55: Error: HTTP: HTTP/1.1 403 Forbidden
Date: Wed, 12 May 2010 15:25:11 GMT
Server: Apache
Vary: accept-language,accept-charset
Accept-Ranges: bytes
Connection: close
Content-Type: text/html; charset=iso-8859-1
Content-Language: en
Expires: Wed, 12 May 2010 15:25:11 GMT
13/05/2010 13:56:55: Error: HTTP GET failed
13/05/2010 13:56:55: Error: Failed to open Rules file: REMOVED :// REMOVED /rules/syslog/ocds-dpsarch01a.rules
答案1
请求应用程序是否可能对这两个名称的处理方式不同?检查两个 HTTP 请求的请求标头,确保它们相同。
您还应该查看管理该目录的 .htaccess 文件(如果有)以及 httpd.conf,以查看是否有任何规则保护具有特定名称的文件。此参考资料可能有帮助:http://httpd.apache.org/docs/2.2/sections.html#file-and-web