First, add files
/var/wwwroot/site1/index.html, save the content for
<?php phpinfo();
Second, find nginx profile, my profile is /etc/nginx/conf.d/default.conf
Third, the default.conf is amended as follows
server { listen 80; server_name www.test.com; location / { root /var/wwwroot/site1; index index.html index.htm index.php; } }
Fourth, restart nginx
service nginx restart
Fifth, open the browser, enter www.test.com, will see the information output of phpinfo