首页 > 解决方案 > 为什么我的网站一直显示未找到?

问题描述

我最近连接了将我的网站从 Bluehost 迁移到私人服务器,但我的 apache 服务器配置出现问题。无论我尝试在我的网站上访问哪个页面,它都会显示 404 this url is not found on this server 错误。

我的网站是用 perl 和 php 编写的。主要是perl。我的旧服务器和新服务器之间的 perl 版本不匹配会导致出现未找到错误吗?我认为这会导致 500 服务器错误。

我究竟做错了什么?为了使它工作,我应该改变什么?

我已经玩弄了控制我的网站的 httpd.conf 文件的一部分。

我的站点位于反向代理后面,该反向代理指向我在 333.333.333.333/test 运行站点的后端服务器

这里是:

SuexecUserGroup "#1001" "#1001"
ServerName test.example.org
ServerAlias www.test.example.org
ServerAlias mail.test.example.org
ServerAlias webmail.test.example.org
ServerAlias admin.test.example.org
DocumentRoot /home/theuser/public_html/testrbs
ErrorLog /var/log/virtualmin/test.example.org_error_log
CustomLog /var/log/virtualmin/test.example.org_access_log combined
ScriptAlias /cgi-bin/ /home/theuser/public_html/test/cgi-bin
DirectoryIndex index.cgi index.html index.htm index.php index.php4 index.php5
<Directory "/home/theuser/public_html/test">
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch 
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory "/home/theuser/public_html/test/cgi-bin">
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>

标签: apache.htaccessperlwebservervirtualmin

解决方案


I ended up having a misconfiguration higher up in the httpd.conf which dissallowed most of what I was doing, so the settings that I showed which I was changing weren't making a difference because Apache didn't look at them.

I uninstalled Virtualmin which was controlling the conf file, then I set Apache up manually and carefully. Now it is working.


推荐阅读