Additional Info for LAMP Stack and Apps on Debian 10

Installation of LAMP Stack and other components takes many minutes after EC2 instance launch. Please proceed to access it only after 10 minutes of launch.

If your installation also includes a LAMP Stack App (such as WordPress), you should access the server 15 minutes after launch to give the installation time to complete.

SSH Access

For SSH access see this page for instructions.

Swap Memory

Swap memory has been created with a 1 GB swap file located at /var/myswap.

To know more about managing swap visit this page.

File Permissions

Debian user admin that is used for SSH access has also been given www-data web server user group permissions.

This gives admin user permissions for SFTP Upload/Edit/Delete actions on files and directories located under /var/www

System disk size

EBS volume (system storage disk) has the default size as provided originally by the fresh server image from the Debian Project.

We recommend you increase storage to atleast 10 GB. Visit this page to know how to modify EBS volume size.

Remember to extend the Linux file system after increasing EBS volume size.

Debian 10 Server Administration

To administer Debian 10 Server directly using SSH, refer to this guide.

SSL Certificates (only if your launch included a Certbot install)

Certbot has been installed to fetch free Let's Encrypt SSL certificates for hosted websites.

Before you proceed ensure you have updated or added VirtualHost (website) configurations under /etc/apache2/sites-available directory for the domains/sub-domains for which you wish to get SSL certificates via Certbot.

You can use it for fetching free SSL certificate for websites hosted on your EC2 instance using SSH access.

To begin fetching certificates for websites setup on your Ec2 instance run the command: sudo certbot --apache

Once fetched, Certbot will automatically fetch fresh certificate files for each website and install them before their certificate expires.

Visit this page for more commands from the official Certbot user guide.

Please note that Certbot has been installed using Canonical's Snap package manager as recommended by the official Certbot documentation.

Suggested Next Steps

Set/Reset the MariaDB root password

To set MariaDB (identical to MySQL database server) root password, connect to this instance via SSH access, and run the following command at the prompt:

sudo mysql_secure_installation

Setup DNS records for Domain or Sub-domain

If you intend to use one or more custom domains or sub-domains with your EC2 instance, you should setup an 'A' record in your domain DNS settings pointing to your instance's public IP.

For example, if the custom domain name that you want pointing to your server is paymypage.com then your DNS records should be added as follows:

dns a-record for ec2 instance

To get the public IP for your EC2 instance launched using our service, click here.

If you need to register a custom domain name for the purpose, click here.

Setup Third-Party SSL Certificate for a Custom Domain

If you wish to use a premium SSL certificate with a custom domain/sub-domain then follow these instructions.

Setup VirtualHost (website) configuration(s)

Whether you wish you use multiple websites on your Debian server or you wish to have WordPress or one website running in Apache's default virtual host configuration, you need to know how to setup and configure them. read tutorial from Setting Up Virtual Hosts...

Install phpMyAdmin

phpMyAdmin lets you manage MySQL databases on your server using just your web browser.

To install, connect the EC2 instance via SSH access and run the following command:

sudo apt-get install phpmyadmin

Website Backups

After you setup your custom domain you should think of keeping a backup of your website(s) in case something goes wrong with any updates you make, or if you plan a major overhaul of the website and wish to rollback to a previous state.

There are TWO ways to perform backups:

  1. Take regular EBS snapshots - You can do this manually from the AWS management console, or automate it using AWS CLI. In both cases, there is a cost to storing the snapshots so you should plan them accordingly.
  2. Use a third-party backup service - You can use a reputed third-party website backup service. The backup service will backup all files in the website's Virtual Host directory, and associated database(s) in MySQL/MariaDB.

 

Next Steps for LAMP Stack Apps (only if they were included in your EC2 launch)

If your instance is not as expected, contact our helpdesk here for clarification.