亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

PHP 網(wǎng)站修改默認(rèn)訪問文件的nginx配置

 更新時(shí)間:2017年05月27日 16:54:41   作者:火*火  
這篇文章主要介紹了PHP 網(wǎng)站修改默認(rèn)訪問文件的nginx配置,需要的朋友可以參考下

搭建好lnmp后,有時(shí)候并不需要直接訪問index.php,配置其他的默認(rèn)訪問文件比如index.html這時(shí)候需要配置一下nginx才能訪問到你想要設(shè)置的文件

直接上代碼,如下是我的配置的一份簡(jiǎn)單的nginx到php-fpm的站點(diǎn),該站點(diǎn)默認(rèn)訪問目錄/ecmoban/www/index.html

server {
listen 80;
location / {
root /ecmoban/www;
index index.html index.php index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
root /ecmoban/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.html;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

以上所述是小編給大家介紹的PHP 網(wǎng)站修改默認(rèn)訪問文件的nginx配置,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論