[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add virtual domains to configuration files
First thing to note is that changes will only be lost if
you run that little windows admin. GUI (EnhPi3.exe) and save
changes using 'Apply' or 'OK' - if you are not planning on doing
this then there will be no problem.
Second, there are two types of sections in this file; areas that
will be lost, and those that will be retained. An examination of the
file should tell you where virtual hosts lie, but offhand I
believe these changes will be retained even if you run the admin GUI
again. In any case a little experimentation after backing up your
config.pi3 should reveil this.
Now to the approach of automatically generating this file; this
has come up a few times. I would do this:
Write a perl script to generate a new file myhosts.pi3 from whichever
dataformat you have. Then add a line in config.pi3 which says
something like
include 'conf/myhosts.pi3'
Then rerun your perl script and restart the server when you add/delete
new v. hosts. Your only issue is to get the syntax right in
myhosts.pi3, luckily this has come up a few times in the list. Which
reminds me that I need to rerun mhonarc to publish the last few
months discussions....
Hope this helps,
John
>
> Hi,
>
> I've quite a number of domains to add to the webserver. It'll be quite
> troublesome to do it programmatically.
>
> I've looked at the config.pi3 file, and it mentioned
> "#+++---AD Generated Section, modifications will be lost---+++"
>
> ok, so is it possible to add my 100 domains through a text file? it'll be
> quite tedious to have to add it through the GUI.
>
> Thanks for the advice.
>
> Regards,
> John