2

If you have only one large file in etc/apache/sites-available, is there a simple solution to split the apache vhost file into separate files so you could use them in the Apache folders sites-available and sites-enabled?

1 Answer 1

1

I created a python scrript that will do the task at github: https://github.com/rubo77/vhost-split.py

It splits an apache vhost file into separate files so you could use them in the Apache folders sites-available and sites-enabled.

Just pass the configuration file and the script will generate a bunch of files named with the ServerName variable found in each virtual host. Note that repeated entries will generate separate files (http://www.mydomain.com, http://www.mydomain.com-1, …). Usage:

vhost-split.py <config_file> 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.