
Īfterwards, point your browser to to start using it. To test the PHP interface, edit the file /var/and insert the following code. You can edit this file when needed, but for most simple applications, this should not be necessary as most stuff is now done using conf.d. If you prefer Python, then you might consider: # apt install python3 libapache2-mod-pythonĪpache2 configuration file: /etc/apache2/nf If you prefer Perl, then you might consider: # apt install perl libapache2-mod-perl2 Installing the PHP subset of LAMP in Debian is quite simple, you just type this as root in an console (the # is the root prompt symbol): Place some web content in ~/public_html and see the results at The "P" part # To re-enable php in user directories comment the following lines SetHandler application/x-httpd-php-source

To be able to serve PHP (PHP needs to be installed as per instructions) check that /etc/apache2/mods-available/nf is correct: If the permissions are wrong correct them as such: # chmod 755 /home/ If you get a Forbidden error when accessing home folder through Apache check /home/username has permissions drwxr-xr-x. Options MultiViews Indexes SymLinksIfOwnerMatchĬreate directory as user (not as root): $mkdir /home/$USER/public_htmlĬhange group as root (substitute your username) and restart web server: # chgrp www-data /home//public_html

The web server can be installed as follows:Ĭonfiguring user directories for Apache Web ServerĬonfigure Apache module userdir in /etc/apache2/mods-enabled/nf as follows: You can add users to a MariaDB database by using a control panel like phpMyAdmin to easily create or assign database permissions for users. You will need to create a separate user account to connect to your MariaDB databases from a PHP script.

The root account is a privileged account which should only be used for admin procedures. You must never use your root account and password when running databases. The previous script change root password and make some other security improvements. Immediately after you have installed the MariaDB server, you should run the next command to secure your installation. # apt install mariadb-server mariadb-client Next install MariaDB using the following command: Apache2 configuration file: /etc/apache2/nfīefore starting the installation, make sure your distribution is up to date (the '#' indicates that you should do this as root):.
