Easily Host a New Website on an existing EC2 Server
Check out our main page How to set up EC2 and Wordpress From ScratchPoint the New Subdomain URL in Namecheap to the Existing EC2 IP Address
Learn how to set up the set up the Virtual Host for your new website
cd /var/www/mkdir newsitecd /etc/apache2/sites-available/sudo cp existing-site.conf new-site.confsudo nano new-site.confExample: ServerAlias: newsite.sparkxcell.com DocumentRoot var/www/newsite
sudo a2ensite (enables the .conf file you just created. in the sudo command type the file name but dont include .conf)sudo systemctl restart apache2sudo certbot --apacheFollow Digital Ocean on how to install Wordpress onto our Lamp stack.
Note:
define( 'DB_NAME', 'wordpress' ); the Schema Name
define( 'DB_USER', 'wordpressuser' ); the user account you created
define( 'DB_HOST', 'localhost' ); the RDS Endpoint
Instead of relying on an internal database, find out how to link it to our remote database service