On Fri, 16 Jul 2021 14:44:28 -0400
jean-Francois Messier <[email protected]> wrote:

> Can someone explain or point me to a site that explains how I can have
> multiple apps or sites on a single Apache server, using the same main
> hostname, followed by different subdirs

> - https://vps.messier.ca/app1 that would point to /var/www/app1
> - https://vps.messier.ca/app2 that would point to /var/www/app2
> - https://vps.messier.ca/app3 that would point to /var/www/app3

That's easy; just put your apps in subdirectories if they support it.

> or different hostnames that would point to different locations on the
> server (all hostnames would point to the same IP)

> - vps1.messier.ca that would point to /var/www/app1
> - vps2. messier.ca that would point to /var/www/app2
> - vps3.messier.ca that would point to /var/www/app3

That's a better way.  You can use Name-Based Virtual Hosts.  If you're
using Apache: https://httpd.apache.org/docs/2.4/vhosts/name-based.html

I don't know how to do it using Nginx, but I'm sure if you google
"Name-based Virtual Hosts Nginx" you'll find something useful.

Regards,

Dianne.

To unsubscribe send a blank message to [email protected]
To get help send a blank message to [email protected]
To visit the archives: https://lists.linux-ottawa.org

Reply via email to