脚本向我的 URL 发出 GET 请求,如下所示:
http://mydomain.com/cgi-bin/uu_ini_status_audios.pl?tmp_sid=b742be1d131c4d32237a9f1fcdca659e&rnd_id=0.2363453360320319
但是,我立即收到了 404 返回:
The requested URL /cgi-bin/uu_ini_status_audios.pl was not found on this server.
但是该脚本存在于我的服务器上,我可以看到该文件!它具有正确的权限(我肯定给了它 777)。它也归我的 apache 用户所有,并且属于 apache 组。
我错过了什么??
感谢您对此的任何帮助!
我以为它会是一个 htaccess(重写),但我不认为它是了。我尝试在其中放置一个 index.php 文件并尝试通过我的 URL 访问它,但我什至不能这样做!我试过这个:
http://mydoamin.com/cgi-bin/index.php- 同样的 404 错误!我在我的错误日志中得到了这个:
[Tue Sep 14 14:42:49 2010] [error] [client xx.xxx.xx.xxx] script not found or unable to stat: /var/www/vhosts/mydomain.com/cgi-bin
Run Code Online (Sandbox Code Playgroud)
访问日志文件:
xx.xxx.xx.xxx - - [14/Sep/2010:14:48:25 +0200] "GET /cgi-bin/index.php HTTP/1.1" 404 475 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 (.NET CLR 3.5.30729)" …
我正在寻找一个命令来从我的 apache access_log 中列出 10 或 20 个前 404 错误 URL。谁能帮我这个?
谢谢
我想用 Apache 进行 404 重定向,我找到了几种解决方案:
.htaccess 方法。但如果没有必要,我不想添加 .htaccess。
虚拟主机方法:
Run Code Online (Sandbox Code Playgroud)<VirtualHost *:80> ServerAlias *.example.com Redirect 404 /index.html ErrorDocument 404 /index.html </VirtualHost>
我想知道 Redirect 404 和 ErrorDocument 404 有什么区别?
linux redirect errordocument http-status-code-404 apache-2.2
我已成功为 IIS7 设置自定义静态错误页面。IIS7 目前用作 Java tomcat 应用程序的网关。问题在于,当提供 404 错误页面时,它会提供 HTTP 200 状态代码标头。我想要一种配置 IIS 以继续发送 HTTP 404 的方法。错误页面作为 webroot 中的静态页面存在。
这是我的 web.config 的主要部分:
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS Redirect" enabled="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
</rule>
<rule name="Reverse Proxy" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:8080/{R:1}" />
<conditions>
<add input="{R:1}" pattern="error/*." negate="true" />
</conditions>
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Custom" existingResponse="Auto">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/error/404.htm" responseMode="ExecuteURL" /> …Run Code Online (Sandbox Code Playgroud) 在 curl 中使用各种调用时,我经常看到这一点。
我不确定它是否是我的某些退货导致错误 400 的根本原因,但作为一个新手只是好奇比什么都重要。
我有一个运行 Server 2003 Datacenter 和 IIS 5 的网络服务器,它托管着各种 ASP.NET 2.0 网站。我正在尝试添加我通过 VS2010 Beta 编写的 ASP.NET 4.0 网站,并且我在服务器上安装了 .NET 4.0 Beta 1。
该网站似乎配置正确;匿名访问已打开,它指向正确的文件夹,并设置为 asp.net 4.0。
为什么在本地和远程浏览它时会出现 404 错误?
下午,
我在 domainA.com 上发布了一个 API,并且已经做了几个月。*http:/domainA.com/service.svc 带我到资源 (c:\inetput\wwwroot\api) * https://domainA.com/service.svc一夜之间无法连接相同的资源。
连接到 https 时,网站日志文件显示错误 404。浏览到 * https://domainA.com/service.svc声称网页不可用 使用 http 时日志文件显示连接成功,使用 https 时日志文件显示 404。
SSL 证书已安装工作数月,即将到期。
我可以从远程 PC 到 domainA 80 和 domainA 443 没有问题,所以我知道防火墙很好(日志文件显示连接)。
BINDING 显示正在使用的正确端口 80 和 443。
IP 地址 (192.168.10.38) 仅供本网站使用。
几个月前,我在 (192.168.10.38) 上发布了一个测试 URL,用于在部署之前进行测试,但这被停止了,新 URL 已测试,旧 URL(网站)在前一段时间被删除。
已尝试重新启动有问题的站点。
已尝试 IISreset。
我不明白为什么 * https://domainA.com/service.svc一夜之间现在无法连接 IIS BASIC 设置也说它指向的资源。端口 443 已打开并正常工作。
在检查 IP/443 端口是否确实指向与 http 引用相同的资源的过程中,即 192.168.10.38 ...但日志文件确认连接,所以我确定它一定没问题。
感谢您的任何帮助。斯科特
IIS7
ASP.NET
赢得 2008 r2
全部修补
我最近安装的 logwatch 报告显示了这个:
--------------------- httpd Begin ------------------------
0.78 MB transferred in 5864 responses (1xx 0, 2xx 4900, 3xx 0, 4xx 964, 5xx 0)
160 Images (0.16 MB),
857 Content pages (0.62 MB),
4847 Other (0.00 MB)
Requests with error response codes
404 Not Found
/%E2%80%98planeat%E2%80%99-film-explores-l ... greenfudge-org/: 1 Time(s)
/10-foods-to-add-to-the-brain-diet-to-help ... -function/feed/: 1 Time(s)
/10-ways-to-reboot-your-body-with-healthy- ... s-and-exercise/: 1 Time(s)
/bachmann-holds-her-ground-against-raising ... com-blogs/feed/: 1 Time(s)
/behind-conan-the-barbarians-diet/: 1 Time(s)
/tag/dietitian/: 1 Time(s)
/tag/diets/page/10/: 1 Time(s)
/tag/directory-products/feed/: 1 Time(s)
/wp-content/uploads/2011/06/1309268736-49.jpg: 1 Time(s)
/wp-content/uploads/2011/06/1309271430-30.jpg: …Run Code Online (Sandbox Code Playgroud) 我正在尝试按如下方式设置 nginx 配置:当收到如下请求时/tile/SteveCountryVic/1/2/3.png:
http://localhost:5005/1/2/3.png/tile/SteveCountryVic/1/2/3.png这是我的配置,它不太工作:
server {
listen 80;
server_name localhost; error_log /tmp/nginx.error.log notice;
access_log /tmp/nginx.access.log;
location /tile/SteveCountryVic/ {
rewrite_log on;
#rewrite ^.*/(\d+)/(\d+)/(\d+).*$ /$1/$2/$3.png break;
proxy_intercept_errors on;
error_page 404 = @dynamiccycletour;
#proxy_set_header Host $http_host;
#proxy_pass http://127.0.0.1:5005;
proxy_redirect /tile/SteveCountryVic/ http://localhost:5005/;
location @dynamiccycletour {
rewrite_log on;
#rewrite ^(\d+)/(\d+)/(\d+).*$ /tile/SteveCountryVic/$1/$2/$3.png break;
proxy_pass http://115.x.x.x:20008;
}
location /tile/ {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:20008;
proxy_cache my-cache;
proxy_cache_valid 200 302 60m;
proxy_cache_valid 404 1m;
}
...
Run Code Online (Sandbox Code Playgroud)
在此配置中,所有请求似乎都被重定向到代理服务器,但最终会提供图像。此外,错误日志包含以下几行:
2013/09/10 09:44:11 [error] …Run Code Online (Sandbox Code Playgroud) 我一直在为我工作的公司建立一个私人回购。一开始它工作正常,但是今天,当我尝试安装我构建的新 rpm 时,我遇到了这个丑陋的错误:
http://<server_name>/centos/7/repodata/a6ecd0c880b1f5128974cd147a53cd84d7dab269b9055215b6fbe99fb98f6d7a-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found-:-- ETA
Run Code Online (Sandbox Code Playgroud)
我已经试过了:
yum clean all
rm -rf /var/cahe/yum
yum repolist
Run Code Online (Sandbox Code Playgroud)
又是同样的错误。
我已经删除了 repo 服务器上 repodata 下的所有内容,并再次使用以下命令重新创建了 repo:
createrepo /path/to/repo/directory
Run Code Online (Sandbox Code Playgroud)
重新创建 repo 后,我又跑了
yum clean all
rm -rf /var/cahe/yum
yum repolist
Run Code Online (Sandbox Code Playgroud)
但仍然没有任何作用
我 100% 确定客户端配置没问题,因为我是目前唯一一个使用服务器的人,上周它运行良好。
否则,可以在 http 中访问 repo,我可以使用 Web 浏览器查看所有包和 repodata。如果一个执行
curl http://<server_name>/centos/7/repodata/repomd.xml
Run Code Online (Sandbox Code Playgroud)
从客户端,我得到了正确的文件。
我已经意识到主数据库名称的名称在客户端中不是正确的(即使在运行之后yum clean all; rm-rf /var/cache/yum; yum update)。我该如何解决这个问题?我整个下午都在研究这个问题,但没有任何改变
存储库目录中的权限设置正常(三重检查)
我错过了什么???
预先感谢您的帮助
apache-2.2 ×3
iis-7 ×2
.net-4.0 ×1
alpn ×1
apache-2.4 ×1
asp.net ×1
centos7 ×1
grep ×1
http-headers ×1
httpd ×1
https ×1
iis ×1
linux ×1
logging ×1
logwatch ×1
mod-rewrite ×1
nginx ×1
permissions ×1
php ×1
private ×1
proxy ×1
redirect ×1
repository ×1
rewrite ×1
rpm ×1
ssl ×1
ubuntu-16.04 ×1
url ×1