SupportTutorialsLAMP made easy

LAMP made easy

Logo_LAMPWe would like to make you aware of a novelty in our ASI. Some of you may have noticed already that we had implemented an additional LINUX option called LAMP some time ago.

This option is available from our website when ordering a VPS or dedicated server, that runs under either LINUX operating system CentOS, Debian and Ubuntu.

By that additional option, you will - with the aforementioned LINUX distributions - be provided with a complete webserver environment. In addition to the LINUX operating system (L) you will receive an installation of Apache 2(A), MySQL (M), and the commonly known script language PHP (P).  PHPMyAdmin tool is equally installed, to simplify the administration.

In order to establish a website it is necessary for the domain to resolve to the IP of the server. At first, please activate the default website.

a2dissite default
a2dissite default-ssl
service apache2 reload

To save the change you will have to reload the configuration finally. Now establish a configuration file for a virtual host in the following library: /etc/apache2/sites-available let's call it:  example.com

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com/public_html/
ErrorLog /var/www/example.com/logs/error.log
CustomLog /var/www/example.com/logs/access.log combined
</VirtualHost>

Creating the required directories:

mkdir -p /var/www/example.com/public_html
mkdir /var/www/example.com/logs

Sure enough, this new website needs to be activated now by creating a link to the configuration file in library: /etc/apache2/sites-enabled

a2ensite example.com
service apache2 reload

A phpinfo.php file is helpful to check if PHP is working correctly:

cat > /var/www/example.com/public_html/phpinfo.php << EOF
<? phpinfo(); ?>
EOF

If the webserver fails to start or refuses to read the configuration, it is always a good idea to check the logfiles for any errors. They are mostly located in  /var/log/apache2/*.  To be sure, you can check the configuration with the command /usr/sbin/apachectl configtest before restarting the webserver.

We would like to help the enthusiasts among you who can play around with LAMP without any stress of installing it.

SupportTutorialsLAMP made easy