The first option you just need to have the applications in their
different folders, you're using the same domain name.
The second option you can use vhosts in Apache. Usually you would have a
httpd-vhost.conf file.
Example:
VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "/srv/http/localhost"
ServerName localhost
ServerAlias local
ErrorLog "/var/log/httpd/localhost-error_log"
CustomLog "/var/log/httpd/localhost-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@app1.localhost
DocumentRoot "/srv/http/app1.localhost"
ServerName app1.localhost
ServerAlias app1
ErrorLog "/var/log/httpd/app1-error_log"
CustomLog "/var/log/httpd/app1-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@app2.localhost
DocumentRoot "/srv/http/app2.localhost"
ServerName app2.localhost
ErrorLog "/var/log/httpd/app2-error_log"
CustomLog "/var/log/httpd/app2-access_log" common
</VirtualHost>
Hope this is was you're looking for...
Le 2021-07-16 à 14 h 44, jean-Francois Messier a écrit :
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
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
I want to re-use a VPS on multiple small applications, and I do not want
to use strange port numbers.
Thanks :-)
Jean-Francois Messier
To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org
--
*Claude Cardinal*
Club Linux Gatineau
https://www.linux-gatineau.org/ <https://www.linux-gatineau.org/>
------------------------------------------------------------------------
/"Le code source libre c'est l'ouverture de l'esprit"
"Open Source is open minded"/
------------------------------------------------------------------------