I have a mod_cgi code "site.py" which is used to serve a website. I'm running several instances of this website on a single apache server, each instance has its own config file.
Currently my apache configuration (httpd.conf) contains
ScriptAlias /siteA /path/to/mainA.py # loads configA.txt then runs site.py
ScriptAlias /siteB /path/to/mainB.py # loads configB.txt then runs site.py
ScriptAlias /siteC /path/to/mainC.py # loads configC.txt then runs site.py
. . .
Is there a better way to have multiple sites like this? It would be good to have a way to avoid having a httpd.conf entry for each site and/or not needing a mainX.py for each site.
The goal is to have to create / change fewer files if I want to add another site or when I need to make changes.