记一次apache错误异常处理

2017-11-07 15:01:00

服务器apache错误日志出现许多类似下面的问题:script not found or unable to stat: /var/www/cgi-bin/test-cgi script not found or unable to stat: /var/www/cgi-bin/test.sh script not found or unable to stat: /var/www/cgi-bin/test-cgi.pl发现httpd.conf中有部分这样配置: # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about tra...

阅读全文

伪静态设置及注意事项 403/404错误调试

2016-04-21 09:18:00

在做伪静态设置的时候,发现不是报403错误,就是404,百度一下可以总结为两大问题源:一服务器配置问题(常见403错误),二.htaccess伪静态规则没写对。伪静态设置及注意事项 403/404错误调试方法 比如,403错误解决问题修改apache配置:1.启用rewrite_module;2.目录权限设置<Directory "F:/www"> Options Indexes FollowSymLinks AllowOverride all </Directory> 有设置多域名的VirtualHost 也要设置:Options Indexes FollowSymLinks3.还有就是检查.htaccess规则 伪静态注意事项:.htaccess需放到网站根目录;注意权限设置,例如:# 禁止PHP文件运行<FilesMatch (.*)\.php$> order allow,deny deny from...

阅读全文