简体   繁体   English

NGINX + mediawiki:设置索引。html 在索引之上。php(索引优先级)

[英]NGINX + mediawiki: Setting a index.html on top of index.php (index priority)

I am trying to set a index.html file to be on top of my mediawiki installation.我正在尝试将 index.html 文件设置在我的 mediawiki 安装之上。 I could set it to the logo link at the header but I am having trouble setting the domain to point to that index.html instead of the default index.php mediawiki comes with.我可以将其设置为 header 处的徽标链接,但我无法将域设置为指向该索引。html 而不是默认索引。php mediawiki 附带。 On a Apache server I could easily set a .htaccess at mediawiki's root folder, but since I am using NGINX that doesn't work.在 Apache 服务器上,我可以轻松地在 mediawiki 的根文件夹中设置 .htaccess,但因为我使用的是 NGINX,所以它不起作用。

I tried to set a "index index.html index.php;"我试图设置一个“索引 index.html index.php;” on a location block in the.conf file but it is not working.在 .conf 文件中的位置块上,但它不起作用。

There were nothing wrong with the directive I was using.我使用的指令没有任何问题。 However, the server running NGINX had another set of configurations for the same site in a different folder that I was unaware of.但是,运行 NGINX 的服务器在我不知道的不同文件夹中对同一站点有另一组配置。 So if you are facing the same problem, double check the folder "sites-available" or any other folder under /etc/nginx/.因此,如果您遇到同样的问题,请仔细检查文件夹“sites-available”或 /etc/nginx/ 下的任何其他文件夹。

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

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