How to install Ruby on Rails onto an existing Apache server?
So I've had a webserver with Ubuntu and Apache on the LAMP stack for about a year. It's mainly just a portfolio website.
I've just made an API using Ruby on Rails that is on my local machine and I've read up that you can host multiple different applications on the same droplet.
The idea is to make a subdomain such as www.api.Example.com
My existing website I have is www.Example.com
With this subdomain I wish to host my Ruby on Rails API, it uses PHP myadmin which I think I'll have to install on the LAMP stack? And it also has gems to install such as mysql2.
My question is how do I do this?
I've looked at so many tutorials but they're all saying a different thing and mentioning Nginx and I don't know how to get a subdomain. I bought my domain from Google so do I do it on Google Domains or do I do it on Digital Ocean?
So altogether I'm asking how to...
Make a subdomain such as www.api.Example.com?
Do I install PHPmyadmin on the main Apache bit and will it be on both my subdomain and main domain?
Is it possible to have a Ruby On Rails app and an existing Apache web server working concurrently?
How do I move my API from my PC over? Is it simply a case of copying over files? (To the Sites folder I'm guessing?)
How would I start it? (The usual rails s? or is it slightly different cause of the sub domain?
MySQL is already installed through the LAMP stack so I can just forget about it right?
Is that everything? It's been a good 7 months since I actually went on my server terminal so I'm probs a bit rusty with the commands.
Thanks in advance, I know I'm pretty bad at explaining myself but I think I did an alright job