7) Test PHP Configuration
Finally create the phpinfo.php
file on web server root directory to test the php configuration.
$ sudo nano /usr/share/nginx/html/phpinfo.php <?php phpinfo(); ?>
Run nginx configuration test
$ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Restart & Reload Necessary Services to take effect.
[Restart Nginx & php-fpm services] $ sudo systemctl reload nginx.service $ sudo systemctl restart nginx.service [Restart php-fpm service] $ sudo systemctl restart php-fpm.service
Open your web browser and navigate to http://localhost/phpinfo.php or http://your-server-ip-address/phpinfo.php or http://127.0.0.1/phpinfo.php