After setting up lnmp, sometimes you don’t need to access index.php directly. You need to configure other default access files such as index.html. At this time, you need to configure nginx to access the file you want to set.
Go directly to the code. The following is a simple nginx to php-fpm site configured by me. The site defaults to accessing the directory /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; } }
The above is what the editor gives you The introduced PHP website modifies the nginx configuration of the default access file. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Linux new version
SublimeText3 Linux latest version

Notepad++7.3.1
Easy-to-use and free code editor
