Xampp On Aws

Download PDF hosting-xampp-on-aws.pdf Contents. Introduction; What You Will Need; Step 1: Register with Amazon Web Services; Step 2: Register with Bitnami; Step 3: Connect your AWS and Bitnami Accounts. The following procedures help you install an Apache web server with PHP and MariaDB (a community-developed fork of MySQL) support on your Amazon Linux 2 instance (sometimes called a LAMP web server or LAMP stack). You can use this server to host a static website or deploy a dynamic PHP application that reads and writes information to a database.

If you’re having an only 1Gb RAM , 30 Gb storage VPS on ECS AWS, how will you deploy a website? Here is my suggestion.

  1. Launch an instance using Ubuntu ( not Windows OS , because it needs more than 20 Gbs to complete an Windows Server instance ).
  2. Assign an Elastic Ip for your instance, connect via SSH.
  3. Setup XAMPP for linux on your ubuntu .

+ Stop ubuntu apache process:

/etc/init.d/httpd stop

+ Get xampp installation script:
wget https://www.apachefriends.org/xampp-files/7.0.23/xampp-linux-x64-7.0.23-0-installer.run
sudo chmod +x xampp-linux-x64-7.0.23-0-installer.run
sudo ./xampp-linux-x64-7.0.23-0-installer.run

+ XAMPP / LAMPP commands:
sudo /opt/lampp/lampp start
sudo /opt/lampp/lampp stop
sudo /opt/lampp/lampp restart

Set rules to access phpmyadmin at : /opt/lampp/etc/extra/httpd-xampp.conf
4. Configure virtual hosts
Change the permission for lampp daemon user (default in /opt/lampp/etc/httpd.conf)
chown -R daemon.daemon /opt/lampp/htdocs
Non-SSL:
ServerName nkl.com
DirectoryIndex index.php
ErrorLog 'logs/dulichclub1-error_log'
CustomLog 'logs/dulichclub1-access_log' common

SSL HTTPS on:
+ Install let’s encrypt: using certbot
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache

Install ssl cert for a domain
sudo certbot --apache -d mywebsite.com
for multiple domains , sub-domains
sudo certbot --apache -d mywebsite.com -d sub1.mywebsite.com -d sub2.mywebsite.com
full command
certbot certonly --lampp -a webroot --webroot-path=/opt/lampp/htdocs/nkl-domain.com -m [email protected] --agree-tos -d nkl-domain.com

Install Xampp On Aws Ubuntu

Aws

Xampp On Aws Software

+Virtual host sample configuration
ServerName nkl.com
ServerAdmin [email protected]
ErrorLog '/opt/lampp/logs/godl-error_log'
TransferLog '/opt/lampp/logs/godl-access_log'
SSLEngine on
SSLCertificateFile '/etc/letsencrypt/live/nkl.com/cert.pem'
SSLCertificateKeyFile '/etc/letsencrypt/live/nkl.com/privkey.pem'
SSLCertificateChainFile '/etc/letsencrypt/live/nkl.com/chain.pem'

5. Test your SSL website url: https://nkl-domain.com