[BUG] Wrong / misleading path in http://www.directadmin.com/features.php?id=1317

websafe

Verified User
Joined
Jun 15, 2010
Messages
103
Location
Opole, PL
Hello,

sorry for posting another thread with a '[BUG]' prefix, but I think that's important.

Today something strange happened, all `NameVirtualHost <IP>:<PORT>` entries disappeared from `/etc/httpd/conf/ips.conf` which resulted in messages like:

Code:
This IP is being shared among many domains.
  To view the domain you are looking for, simply enter
  the domain name in the location bar of your web browser.

and warnings like:

Code:
[warn] VirtualHost <IP>:<PORT> overlaps with VirtualHost
  <IP>:<PORT>, the first has precedence, perhaps you need
  a NameVirtualHost directive


I've added the required `NameVirtualHost <IP>:<PORT>` entries back to `/etc/httpd/conf/ips.conf` but after adding or removing of an IP (via DA panel) these entries disappeared again...

Then I've found this: http://www.directadmin.com/features.php?id=1317

Code:
When the file:
/etc/httpd/conf/ips.conf

is rewritten, DA will now check the contents of:
/usr/local/directadmin/conf/options.conf

If the following is found:
apache_ver=2.4

(2.4 or higher), then DA will not add the `NameVirtualHost` entries to the ips.conf file.


But there is no file like `/usr/local/directadmin/conf/options.conf`.
I thought, OK, it probably should be `/usr/local/directadmin/conf/directadmin.conf` so I've checked my `/usr/local/directadmin/conf/directadmin.conf` and found there:

Code:
apache_ver=2.0

so according to http://www.directadmin.com/features.php?id=1317 there should be no problem (I'm running HTTPD 2.2).

But there was still a problem with disappearing `NameVirtualHost` entries in `/etc/httpd/conf/ips.conf`.

I kept reading http://www.directadmin.com/features.php?id=1317 again and again and then I came to this brilliant idea, maybe I should look for an `options.conf` file. So I checked `/usr/local/directadmin/custombuild/options.conf` and found there:

Code:
apache_ver=2.4


Bingo! After changing `apache_ver=2.4` into `apache_ver=2.2` in `/usr/local/directadmin/custombuild/options.conf` and adding an IP address (via DA panel) the `ips.conf` file was created as expected, no `NameVirtualHost` entries were missing this time.


So my problem was solved, but:


1. There's a "typo" in http://www.directadmin.com/features.php?id=1317

2. IMVHO - I was really surprised experiencing, that DA is using the content of `/usr/local/directadmin/custombuild/options.conf` during other operations that custombuild in general.

3. This server was built with custombuild 1.x, which resides in `/usr/local/directadmin/custombuild_1.x` and which contains an `options.conf` too (where apache_ver=2.2) so I don't uderstand, why DA was using the newer (2.x, unused) `/usr/local/directadmin/custombuild/options.conf` instead of `/usr/local/directadmin/custombuild_1.x/options.conf`, but as I've mentioned before, I was rather NOT expecting DA to dive into `custombuild/options.conf`.


I hope this helps, peace & love ;-)
 
Last edited:
You shouldn't be renaming the custombuild directory to anything other than custombuild

I did it probably because I was preparing to upgrade custombuild

http://help.directadmin.com/item.php?id=555

If you're running CustomBuild 1.1 or 1.2, and you wish to update to CustomBuild 2.0, then update process is not just a matter of changing the options.conf setting, because the values in the option.conf differ in 2.0.

General CustomBuild 2.0 documentation
Older installs, re-run the pre-install commands, in case you're missing something.

1) To update to CB2 with all of the default options, type the following:

cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
./build

2) At this point, the default options.conf would have been created. If you want to use all of the default options, skip to step 3. Else, now is when you'd make change to your options.conf.

3) Once you're ready to install what's set, run:

./build all d
./build rewrite_confs
 
Well what we've learned here:
- DA should fix the path in the KB article
- It's a bit strange that apache_ver is both present in directadmin.conf and custombuild (I'm guessing it's from something dating back before CB was doing more things)
- Don't mess around with CB or keep upgrades halfway open :)
 
Last edited:
Back
Top