Apache 2 update script bug

klaus

Verified User
Joined
May 26, 2005
Messages
11
Location
Greece
Hi everybody.

I have update tha apache to apache2 using the
DA scripts
cd /usr/local/directadmin/customapache
./build update
./build clean
./build update_data_ap2
./build convert
./build apache_2
./build php_ap2
./build mod_frontpage_ap2
./build mod_perl_ap2

The error is that the httpd.conf is not updated in /usr/local/directadmin/data/templates
sto when i use the following commands
cd /usr/local/directadmin
./directadmin i
./directadmin p

The /etc/httpd/conf/httpd.conf takes the old format of apache 1.* and it cannot start.

I thing it should be a httpd2.conf just like the
virtual_host2.conf
virtual_host2_sub.conf
virtual_host2_secure.conf
virtual_host2_secure_sub.conf

For now what is the best to do?
Should i put the new http.conf in custom directory? Or just edit the template httpd.conf?

Probably the update script sould create httpd2.conf template!
I hope DA fix apache2 script because others may have the same problem :)
(I am using Centos 3.3)
 
confirmed, the build convert doesnt change /etc/httpd/conf/httpd.conf to v2 format.
 
The ./build convert process should set
Code:
apache_ver=2.0
in /usr/local/directadmin/conf/directadmin.conf.

It should also call
Code:
echo "action=rewrite&value=ips" >> /usr/local/directadmin/data/task.queue
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
echo "action=directadmin&value=restart" >> /usr/local/directadmin/data/task.queue

Which should rewrite the apache configs to apache2 and restart DA.

You might check your directadmin.conf file, your apache2 templates and your directadmin logs to see if the the httpd rewrite is being run correctly by the task.queue.
 
Last edited:
It doesnt remove all the load module lines from the main httpd.conf causing apache 2 to not start due to a bad config file.
 
I thing that the best is to create:
Code:
/usr/local/directadmin/data/templates/httpd2.conf
in templates forlder just like the:
Code:
/usr/local/directadmin/data/templates/virtual*2.conf
and use it if DA configuration says:
Code:
apache_ver=2.0

Any better idea? :D
 
yes you need to wipe /etc/httpd/conf/httpd.conf and then have it copy a new one in its place.

the changes you suggest only affect the vhost configs.
 
whoa.. hold on guys! :)
The error is that the httpd.conf is not updated in /usr/local/directadmin/data/templates
sto when i use the following commands
cd /usr/local/directadmin
./directadmin i
./directadmin p
is *not* supposed to be run when moving to apache 2!!

Notice how it's not part of the conversion instuctions? :)

When you re-run ./directadmin i, it's reinstalling the stock DA install, thus installing the apache 1.3 httpd.conf file.

this command:
Code:
./build convert
is what copies the apaceh 2 httpd.conf from the customapache directory overtop of the /etc/httpd/conf/httpd.conf, and fills it up with all the required Include lines.

Don't run "./directadmin i" for the conversion!!

If after you run the conversion, (without running ./directadmin i) you don't have the apache 2 files, then let me know.
The ./build convert does a check:
Code:
if [ `grep -c 'Port 80' /etc/httpd/conf/httpd.conf` = 1 ]; then
which is how it checks for the apache 1.3 files to do the swap. If that fails, then it won't swap the files.

John
 
Back
Top