- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在它的官方网站上有 Xfilesharing (perl) 脚本 (https://sibsoft.net/xfilesharing.html)
我将它安装在服务器上,并且我有 javaScript 插件与 php 文件一起工作我应该将 JavaScript 放在 HTML 页面中,然后调用 php 文件来做一些事情,我在我的 localhot 上尝试了 php 文件,它 100% 工作,但没有 perl 脚本。
当我将它上传到服务器时,出现以下消息
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@*****.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
我用谷歌搜索并找到了一些解决方案,例如更改权限,我将其更改为 0777,但它不起作用。
我也将 .htaccess 文件的名称更改为 .htaccess2 以查看发生了什么,但没有任何效果。
这个 .htaccess 文件
deny from 10.0.0.182
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_CGI_AUTHORIZATION:%1]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([0-9A-Za-z]{12})(\/.+|\.html?|$) /cgi-bin/index_dl.cgi?op=download1&id=$1&fname=$2 [L]
RewriteRule ^embed-([0-9A-Za-z]{12})\.html$ /cgi-bin/index_dl.cgi?op=video_embed&file_code=$1 [L]
RewriteRule ^embed-([0-9A-Za-z]{12})-(\d+)x(\d+)\.html$ /cgi-bin/index_dl.cgi?op=video_embed&file_code=$1&w=$2&h=$3 [L]
RewriteRule ^embedmp3-([0-9A-Za-z]{12})\.html$ /cgi-bin/index_dl.cgi?op=mp3_embed&file_code=$1 [L]
RewriteRule ^mp3embed-([0-9A-Za-z]{12})\.mp3$ /cgi-bin/index_dl.cgi?op=mp3_embed2&file_code=$1 [L]
RewriteRule ^vidembed-([0-9A-Za-z]{12}) /cgi-bin/index_dl.cgi?op=video_embed2&file_code=$1 [L]
RewriteRule ^box$ /cgi-bin/index_box.cgi [L]
RewriteRule ^dl$ /cgi-bin/index_dl.cgi [L]
RewriteRule ^download$ /cgi-bin/index_dl.cgi?op=download1 [L]
RewriteRule ^$ /cgi-bin/index.cgi [L]
RewriteRule ^free([0-9]+)\.html$ /cgi-bin/index.cgi?op=registration&aff_id=$1 [L]
#RewriteRule ^checkfiles\.html$ /cgi-bin/index.cgi?op=checkfiles [L]
RewriteRule ^contact\.html$ /cgi-bin/index.cgi?op=contact [L]
RewriteRule ^premium\.html$ /cgi-bin/index.cgi?op=payments [L]
RewriteRule ^login\.html$ /cgi-bin/index.cgi?op=login [L]
RewriteRule ^catalogue(.*)\.html$ /cgi-bin/index.cgi?op=catalogue&date=$1 [L]
RewriteRule ^news([0-9]*)\.html$ /cgi-bin/index.cgi?op=news&page=$1 [L]
RewriteRule ^n([0-9]+)-.*\.html$ /cgi-bin/index.cgi?op=news_details&news_id=$1 [L]
RewriteRule ^faq\.html$ /cgi-bin/index.cgi?op=page&tmpl=faq [L]
RewriteRule ^DMCA\.html$ /cgi-bin/index.cgi?op=page&tmpl=DMCA [L]
RewriteRule ^tos\.html$ /cgi-bin/index.cgi?op=page&tmpl=tos [L]
RewriteRule ^links\.html$ /cgi-bin/index.cgi?op=links [L]
RewriteRule ^make_money\.html$ /cgi-bin/index.cgi?op=make_money [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^pages/([a-z0-9\-\_]+).html /cgi-bin/index.cgi?op=page&tmpl=$1$2 [L]
RewriteCond %{QUERY_STRING} .*page=[0-9]+.*
RewriteRule ^users/([0-9A-Za-z\-_]{4,64})/?([0-9]+|$) /cgi-bin/index.cgi [L,NC,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^users/([0-9A-Za-z\-_]{4,64})/?([0-9]+|$) /cgi-bin/index.cgi?op=user_public&usr_login=$1&fld_id=$2 [L,NC]
RewriteRule ^u/([0-9A-Za-z\-_]+) /cgi-bin/index_dl.cgi?op=deurl&id=$1 [L,NC]
RewriteRule ^d/([0-9A-Za-z\-_]+) /cgi-bin/index_dl.cgi?op=deurl&id=$1&mode=2 [L,NC]
RewriteRule \.pm$ /404.html [L]
ErrorDocument 404 /404.html
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
谁能帮帮我?
最佳答案
大家好,我通过将权限更改为 0644 来解决这个问题,这是来 self 的服务器配置谢谢
关于javascript - 尝试使用 ErrorDocument 处理请求时遇到 500 Internal Server Error 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43167403/
我有一个带有多个虚拟主机的服务器。现在我想为整个服务器设置错误文档。我在 /var/www/error/* 中找到了我的错误站点,但使用 ErrorDocument指令我只能设置相对于文档根目录的错误
所以我有一个带有子目录的子域的apache服务器。我把我的目录变成子域。所以,而不是 example.site.com/mycoolsite它是 mycoolsite.example.com .或者换
有没有办法让您的PerlAuthenHandler,PerlAuthzHandler甚至您的PerlHandler更改请求的错误文档? 示例:当用户转到特定页面并收到错误消息时,我想让一个子例程选择将
我正在尝试对域及其所有子域使用相同的 404 ErrorDocument,子域在/var/www/路径中都有自己的目录 Apache ErrorDocument 指令需要一个相对路径(相对于当前目录)
在 Apache 中是否有这样的可能......(即重定向到一个外部 url,其路径导致 403 错误传递) ErrorDocument 403 http://www.sample.com/{{RED
我在子文件夹中有一个 htaccess 文件,如下所示: /subfolder/.htaccess 在 htaccess 文件中的以下代码设置一个 404 ErrorDocument ErrorDoc
请告诉我为什么这不起作用。它正在工作,但莫名其妙地决定停止工作。 在 php 中,如果找不到这样的页面,我会发出 404。 if(checkPageExists($escaped_url_page_n
我的 .htaccess 文件中有一堆 ErrorDocument 指令,以便捕获 Apache 可能向用户抛出的几乎所有可能的错误,并将所述用户重定向到我的错误 Controller ,然后将错误呈
我有一个 .htaccess 文件,如下所示: AddDefaultCharset utf-8 AddCharset utf-8 .html Order Allow,Deny ErrorDocumen
我有一个文件 index.php ,并在同一级别 .htaccess使用此代码: ErrorDocument 404 index.php 当我生成未找到错误时,会打印一个带有文件名的页面,因此,在这种
我希望将丢失文件和无效目录的请求重定向到自定义 404 错误页面。我相信这可以使用 2 种方法来完成。 # redirect invalid requests and missing files to
任何人都可以请指教吗?我希望我的网站访问者的默认页面是 index.php,对于所有不存在的页面,访问者应该看到 errordoc.php 所以我把它放在 .htaccess 中: ErrorDocu
我有一个来自 AWS EC2 服务的服务器,在 Linux ubuntu 上运行,并且我已经安装了 apache、php 和 mysql。 我已在文档根 /var/www/html 中添加了一个 .h
是否有类似通配符指令的东西可以捕获所有可能的错误并在单个自定义错误页面中处理它们? ErrorDocument 404 /error.php?code=404 ErrorDocument 403 /e
发生错误时,我正在尝试转移到另一台主机。我有这个,并且有效: ServerName test.com. ServerAlias test.com ProxyPreserveH
我想在我的项目中有一个自定义的 403 页面。所以我在 .htaccess 文件中添加了这些代码: Order deny,allow Deny from all Allow from 192.168.
我有多个ErrorDocuments在我的 .htaccess 文件中设置错误,例如 404、401、403 等,这些错误都重定向到我的错误页面,但 ErrorDocument当 PHP 报告 500
我基本上想要做的是将任何 404 请求重定向到 /404/但后来我想让它“拉”页面到 index.php?error=404 ,同时将 URL 保留为 /404/ - 然后我可以使用 PHP (使用
我的网站结构如下: - pages 404.php 403.php - app /css /-script index.php .htaccess 在我
我知道这可能是重复的,但我有更好的细节。我将 .htaccess 文件设置为显示最常见错误的自定义错误页面: # remove .php RewriteEngine On Rewr
我是一名优秀的程序员,十分优秀!