the nginx server need to be configured to run php script and render web pages :
this is done by creating a web application directory in /var/www/application-folder and using any of the text editors such as vim or nano to write the default bare-bone nginx configuration into the following directory : /etc/nginx/sites-available/application-folder.
These will tell nginx what port to listen to, default landing page, location etc.
the next step is to link your configuration and test it for any errors .
you can again test your php installation on the nginx server by running by crating a file and put in the command phpinfo into it.
Below is a screenshot of all this process:
go back to your mysql mode by typing the command sudo mysql either create a new database or use existing database and putting your credential GRANT privilege's to the current user - create tables ussing the CREATE TABLE statement and insert records into the table by using the INSERT statement:
exit the mysql mode by typing exit now navigate to your web-application folder created earlier inside /var/w.ww/application-folder and create a file called todo.php using vim or nano text editor.
Write a php script that will connect to the created database using the credentials and create a loop that will loop through all the records in the database and display them in an html order list tag.
Below is a screenshot of the resultant output of all the steps explained above:
the nginx server need to be configured to run php script and render web pages : this is done by creating a web application directory in /var/www/application-folder and using any of the text editors such as vim or nano to write the default bare-bone nginx configuration into the following directory : /etc/nginx/sites-available/application-folder.
These will tell nginx what port to listen to, default landing page, location etc. the next step is to link your configuration and test it for any errors .
you can again test your php installation on the nginx server by running by crating a file and put in the command phpinfo into it. Below is a screenshot of all this process:
go back to your mysql mode by typing the command sudo mysql either create a new database or use existing database and putting your credential GRANT privilege's to the current user - create tables ussing the CREATE TABLE statement and insert records into the table by using the INSERT statement:
exit the mysql mode by typing exit now navigate to your web-application folder created earlier inside /var/w.ww/application-folder and create a file called todo.php using vim or nano text editor. Write a php script that will connect to the created database using the credentials and create a loop that will loop through all the records in the database and display them in an html order list tag. Below is a screenshot of the resultant output of all the steps explained above: