如何将我的网站的默认页面设置为index.html?

时间:2021-03-26 00:24:17

I'm making my company's website and I work on the FTP via Filezilla. But, even though I already have a page named index.html to be the homepage, when I open my website in the browser it is not set as the default page.

我正在创建我公司的网站,我通过Filezilla在FTP上工作。但是,即使我已经有一个名为index.html的页面作为主页,当我在浏览器中打开我的网站时,它不会被设置为默认页面。

I read on some forums that this setting must be made by apache, but I'm not sure how to do it.

我在一些论坛上看到这个设置必须由apache完成,但我不知道该怎么做。

1 个解决方案

#1


Yes, the DirectoryIndex directive in your Apache configuration must contain (among potential others) index.html

是的,Apache配置中的DirectoryIndex指令必须包含(在其他潜在的其他方面)index.html

See http://httpd.apache.org/docs/2.2/mod/mod_dir.html

But it's usually the default setting, so make sure your file is actually named index.html and not Index.html, index.HTML or any other case variant because *nix servers are case sensitive.

但它通常是默认设置,因此请确保您的文件实际上名为index.html而不是Index.html,index.HTML或任何其他案例变体,因为* nix服务器区分大小写。

#1


Yes, the DirectoryIndex directive in your Apache configuration must contain (among potential others) index.html

是的,Apache配置中的DirectoryIndex指令必须包含(在其他潜在的其他方面)index.html

See http://httpd.apache.org/docs/2.2/mod/mod_dir.html

But it's usually the default setting, so make sure your file is actually named index.html and not Index.html, index.HTML or any other case variant because *nix servers are case sensitive.

但它通常是默认设置,因此请确保您的文件实际上名为index.html而不是Index.html,index.HTML或任何其他案例变体,因为* nix服务器区分大小写。