So you've installed a basic command line version of Debian. I would abandon this and install something with a GUI. I doubt that even a professional sysadmin would use such a basic installation nowadays!
If you do this, then it should be just a simple matter of logging into your system as root, browsing the file system to find the files you need, and editing them as required. You could do this as a user, but you would need to use the command line. Therefore, I recommend the root route.
However, I get the feeling that you haven't installed PHP yet. Therefore, my answer below takes this into account. To check that PHP is installed, use the following command:
$ php -v
You should get some output like:
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
If you insist on using Debian, then you can explore the directory structure at:
wiki.debian.org
(I've always used CentOS because that's what most professional sysadmins seemed to prefer at the time I started out. Also, for support purposes, I wanted the most popular, but I realise that many people have their own reasons for their own preferences.)
It would appear that you need to modify the following files:
For the NGINX configuration:
/etc/nginx/nginx.conf
To enable PHP:
I am not a sysadmin, so I'm not sure about the PHP bit on Debian. If PHP is not installed, then you could look at the following which I've just lifted from the web (there's other stuff which should be useful too):
We are simplifying the cloud. One Login, 18 Countries, 30 Cities, Infinite Possibilities.
www.vultr.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6. Install PHP
Install PHP-FPM 7.4 and other required packages.
$ sudo apt-get install php php-fpm php-curl php-cli php-zip php-mysql php-xml -y
Check the PHP version to verify the installation.
$ php -v
It should return something like this:
PHP 7.4.28 (cli) (built: Feb 17 2022 16:17:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
Create a PHP test file in your editor.
$ sudo nano /var/www/html/phpinfo.php
Paste this into your phpinfo.php file.
<?php
phpinfo();
?>
Save and exit the file.
In your browser, navigate to
http://www.example.com/phpinfo.php to view the PHP test file, which shows the PHP information.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Once you've done this, then it should be just a matter of modifying the file I mentioned in my previous post - look for it at the link I posted above - here it is again:
wiki.debian.org
I will soon be installing a CentOS 8 on a machine that I've had lying underneath my desk for the last few months. I'll be replicating the system I use now on my current machine. I use (and prefer) Apache, but I could also install NGINX while I'm at it. If you like, I can hold your hand through the process so that you end up with a complete professional Linux CentOS 8 setup with GUI trimmings including the Thunar file explorer. There's only one condition, you would need a quad-core processor because although Linux CentOS is awesome, it is no different from other systems in that it has its quirky flaws which includes crashing every now and then for some unknown reason when running on a dual-core. On a quad-core, there are no problems. I've been paying between £100 and £170 for refurbished Dell quad-cores on Amazon, and they are worth every penny.
Offer stands for the next two weeks. Will be starting in the first half of October. No charge whatsoever.
