简体   繁体   English

IIS 7.5域不会显示index.php

[英]IIS 7.5 domain won't show index.php

Have been trying to fix this problem the whole day but nothing seems to work. 整天都在尝试解决此问题,但似乎没有任何效果。

The problem: Server 2008 R2 running IIS 7.5 with my website. 问题:我的网站运行IIS 7.5的Server 2008 R2。 Bindings of this site are set to www.mydomain.com port 80 host * and another binding for www-mydomain-com port 80 host * (Site name in IIS is www-mydomain-com) 此站点的绑定设置为www.mydomain.com端口80主机*,而另一绑定为www-mydomain-com端口80主机*(IIS中的站点名称为www-mydomain-com)

When going to www.mydomain.com it shows me the IIS welcome page instead of the index.php. 当访问www.mydomain.com时,它将向我显示IIS欢迎页面而不是index.php。 The index.php is the only document in my default document settings. index.php是我默认文档设置中的唯一文档。 However when browsing to www.mydomain.com/index.php I get the correct page. 但是,当浏览到www.mydomain.com/index.php时,我得到正确的页面。 Browsing to www.mydomain.com/somefolder/ also redirects me to the index.php in the somefolder so this works. 浏览到www.mydomain.com/somefolder/还将我重定向到somefolder中的index.php,因此可以正常工作。

The default site in IIS is stopped and it doesn't has any bindings. IIS中的默认站点已停止,并且没有任何绑定。 Also tried to add empty hostname port 80 to the www-mydomain-com site but this also won't give the correct page. 还尝试将空的主机名端口80添加到www-mydomain-com网站,但这也无法提供正确的页面。

The situation. 情况。

  • Firewall server running Microsoft Forefront TMG 2010 运行Microsoft Forefront TMG 2010的防火墙服务器
  • SBS 2011 server running DNS 运行DNS的SBS 2011服务器
  • Server 2008 R2 running IIS 7.5 wich hosts my webpage. 运行IIS 7.5的Server 2008 R2托管了我的网页。

-DNS has the following cname record www-mydomain-com pointing to fqdn webserver -DNS的以下cname记录www-mydomain-com指向fqdn网络服务器

-Firewall rule in forefront is set to any incoming going to www-mydomain-com, forefront runs to the test and can connect to www.mydomain.com on port 80 -将forefront中的防火墙规则设置为任何进入www-mydomain-com的传入邮件,forefront进行测试并可以在端口80上连接到www.mydomain.com

Hopefully someone can help me to find the problem, been stuck all day. 希望有人可以帮助我找到问题,整日陷入困境。

Finally found the problem, changed the index.php require_once('includes/config.inc.php'); 终于找到了问题,改变了index.php require_once('includes/config.inc.php'); to require_once('/includes/config.inc.php'); require_once('/includes/config.inc.php'); and it works like it should. 它的工作像它应该的那样。

Try changing the settings from the IIS Manager, run: 尝试从IIS管理器中更改设置,运行:

%windir%\\system32\\inetsrv\\InetMgr.exe %WINDIR%\\ SYSTEM32 \\ INETSRV \\ InetMgr.exe

You can expand the Sites folder find your web site and in the feature view select Default Document, where you can configure what will be the default pages loaded for each folder enrty and set their priority 您可以展开“站点”文件夹找到您的网站,然后在功能视图中选择“默认文档”,您可以在其中配置将为每个文件夹加载的默认页面并设置其优先级

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM