Install Webserver on Debian or Ubuntu

A web server is server software, or hardware dedicated to

Install Webserver on Debian or Ubuntu

A web server is server software, or hardware dedicated to running this software, that can satisfy client requests on the World Wide Web. A web server can, in general, contain one or more websites. A web server processes incoming network requests over HTTP and several other related protocols. Source Wikipedia

Before installing new software, it’s a good idea to refresh your local software package database to make sure you are accessing the latest versions. This helps cut down on the time it takes to update after installation, and it also helps prevent zero-day exploits against outdated software.

Open Terminal / Login SSH Account

sudo apt update && upgrade -y

Install Apach2

sudo apt-get install -y apache2

After successfully installing Apache, you can open your web browser http://localhost or http://your_ip

Install PHP and Modul

sudo apt install php php-curl php-mbstring php-xml php-gd php-dev php-pear php-ssh2 libmcrypt-dev php-zip php-xml php-xsl

Check php and create php.info

sudo nano /var/www/html/info.php

Insert code

<?php phpinfo(); ?>

Ctrl + x to save file and open your web browser http://localhost/info.php or http://your_ip/info.php

if php-mcrypt is not available, you can install it as follows

sudo pecl install mcrypt-1.0.2

Add extension=mcrypt.so on php.ini

sudo nano /etc/php/your-version/apache2/php.ini
sudo nane /etc/php/your-version/cli/php.ini

Restart apache2

sudo /etc/ini.d/apache2 restart
or
sudo systemctl restart apache2

Related Post

Install MariaDB on Debian or Ubuntu
Install PostgreSQL on Debian or Ubuntu
Install FreeRadius MySQL on Debian or Ubuntu
Install FreeRadius PgSQL on Debian or Ubuntu
Enable SQLCounter FreeRadius

Comments

There are 0 comments on this post

Leave A Comment