Hostwinds Tutorials

Search results for:


Table of Contents


Accessing SFTP
Accessing MySQL
Accessing phpMyAdmin
Pointing Your Domain to Your LAMP Server
Important Configuration Files and Directories in Your LAMP Server
Why Would I Want The LAMP Stack?

LAMP Stack Application Overview

Tags: Cloud Servers,  VPS 

Accessing SFTP
Accessing MySQL
Accessing phpMyAdmin
Pointing Your Domain to Your LAMP Server
Important Configuration Files and Directories in Your LAMP Server
Why Would I Want The LAMP Stack?

Among the several pre-made application images available for our Cloud VPS platform, the LAMP stack is the simplest but most powerful. If you want to set up a website without WordPress, Drupal, or a framework we don't have an image for, the LAMP image will install:

  • The latest version of CentOS 7 (7.6+)
  • The latest version of Apache Web Server (2.4+)
  • MariaDB 15.1 installed and configured (MySQL 5.5 equivalent)
  • The latest version of PHP-FPM installed and configured (7.0)

See How to Install the LAMP Stack on a VPS / Cloud server for installation instructions

Of note, part of the installation process for this image is a yum update and yum upgrade so that the installation will be "finished," but you may see this at the first login:

You can start importing files while waiting, but you should wait until everything's installed before editing config files or importing databases.

Accessing SFTP

The LAMP stack image, like many of our Linux options, comes with SSH installed and configured. With that is SFTP access to the filesystem. You can use command-line tools common on Linux distros and OSX or graphical tools like FileZilla — make sure you're connecting on port 22 instead of 21.

To access your server through SFTP, you'll use the server's IP or hostname provided in your welcome email. Your username will be root, and the password will be your server's root password.

The document root directory for the webserver is located in /var/www/HTML

Any content placed here will be publicly accessible on your website. If you're familiar with cPanel's setup, this is similar to the public_html directory.

Accessing MySQL

To access MySQL on the server, you will want to log in via the command line by typing MySQL.

Your login details are saved in /root/.my.cnf

This gives you a root privileged login to MySQL without specifying your username and root password.

You can use MySQL from the command line or phpMyAdmin

Accessing phpMyAdmin

The LAMP stack includes an install of the phpMyAdmin package, which you can access at http://ip.address.of.vps/phpMyAdmin.

You might want to add some protection ( in the form of .htpasswd and/or .htaccess files) to the phpMyAdmin directory in /usr/share/phpMyAdmin .

Pointing Your Domain to Your LAMP Server

All you need to do to point your domain to your new server is update your domain's A record to point to your server's IP address. We have the following Knowledge Base Guide on this process for various domain registrars:

How to Add or Modify Your A Record

If you would like to, you can instead use our Cloud Control DNS Manager

Important Configuration Files and Directories in Your LAMP Server

Apache config: /etc/httpd/conf/httpd.conf

MySQL config: /etc/my.cnf

PHP config: /etc/php.ini

phpMyAdmin config: /etc/phpMyAdmin/config.inc.php

Apache DocumentRoot: /var/www/html/

Apache ServerRoot: /etc/httpd

Why Would I Want The LAMP Stack?

The LAMP Stack is a simple yet popular setup that would allow the development of a website. While this is not exactly recommended for newcomers or those not too experienced with Linux, it is a simplistic setup for its functionality. One reason you may want to use the LAMP Stack, over cPanel for example, could be that you are not looking to spend money on a cPanel license as you only need the base functionality of a PHP Web server. Along with being a quite popular environment for web servers, it has a great deal of documentation for each program involved.

Written by Michael Brower  /  September 28, 2017