Portal Home > Knowledgebase > Tech articles > [EN/LT] How to biuld WEB server on VPS?

[EN/LT] How to biuld WEB server on VPS?

Would you like to build WEB server on your VPS and have your own website?

For this reason you would need to install the following packages:
 - Apache server;
 - MySQL server.

Connect to your VPS rooy user using SSH client program (for Windows OS users we recommend PuTTY). All VPS details were sent to you via email just after your VPS purchase.

Execute the following commands to install APACHE web server and MySQL database server:

    apt-get update

Wait till command execution will be ended and execute the following command:

    apt-get install -y libapache2-mod-php5 mysql-server

On the command execution process you will be asked to create password for MySQL database root user (should be different then VPS 'root' user password). Enter password for the first time ant press ENTER. Repeat password for the second time and once again press ENTER.

After successful password creation installation will continue.

After installation ended create index.php file with function phpinfo() inside it. To create it in the default web server folder use the following command:

echo '<?php phpinfo(); ?>' > /var/www/html/index.php

Also, delete index.html file to keep the only 'start' file on your main web server

rm /var/www/html/index.html

Open your favorit browser and enter your VPS IP address to browser address field. If you will see the page similar to shown bellow it means web server works! On this page are listed details by phpinfo() funkcion (there could be difference because of installed version and configuration). 

Kaip tureti WEB serveri savo VPS'e #2

There is a demo video where you can find the full installation process. Login to VPS from Linux OS (it could be different if you use different OS or other SSH client program).
But everything else is the same - all executed commands are the same as mentioned above.

* In this demo video we use Debian 8 x86 OS.

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Powered by WHMCompleteSolution