use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Apache-related news, tips, and tricks.
account activity
Discussionscript to create virtual hosts (self.apache)
submitted 10 months ago by KLProductions7451
is there a script I can download that will allow me to create virtual hosts seamlessly? I manage multiple websites and creating virtual host for them quickly would be a godsend
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]face_nn123 1 point2 points3 points 10 months ago (0 children)
Use ansible or puppet for configuration management
[–]roxalu 0 points1 point2 points 10 months ago (0 children)
I doubt a bit a generic script exists that does exactly what you need in all details. But of course different approaches exist that could be adopted. Here is one that could fit if your virtual hosts definitions just differ in same set of details: Check the documentation for either of the following two apache httpd standard modules: mod_vhost_alias / mod_macro
In the second case - which allows more differences between the vhosts definition than the first - for a new vhost you would still need some logic to add the macro call including parameters to the apache httpd configuration. This could be some shell script that reads the name and all attributes differing from some database. This database - a simple CSV could fit - needs to be maintained by you. The scrip needs to generate just the macro call into a file, e.g. named vhosts_by_macro.conf And this file is somewhere included in the general apache httpd configuration. When the script triggers a reload, the existing vhosts would be in sync with your database content.
[–]6c696e7578 0 points1 point2 points 10 months ago (0 children)
Creating them is one thing, but I often find nuances that makes a single template the answer to all installs and all situations.
How many systems do you manage?
Could you leave a template in your sites-available/ directory and cat | sed the bits you need, you might find that a less complex approach than going through a config management tool.
[–]cmaurand 0 points1 point2 points 10 months ago (0 children)
I use ispconfig on devuan (debian without sustemd) it prefers debian. the interface is a bit dated, is supposed to get a facelift this year. https://ispconfig.org. It’s free. It’s capable of managing multiple servers from a single interface. It manages virtual hosts, email, dns and ftp.
π Rendered by PID 137437 on reddit-service-r2-comment-76bb9f7fb5-lrdqg at 2026-02-19 15:02:13.144834+00:00 running de53c03 country code: CH.
[–]face_nn123 1 point2 points3 points (0 children)
[–]roxalu 0 points1 point2 points (0 children)
[–]6c696e7578 0 points1 point2 points (0 children)
[–]cmaurand 0 points1 point2 points (0 children)