HOW TO : Upgrade Apache 1.x or 2.x to 2.0.58

Brad said:
done :)
[root@cp customapache]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@cp customapache]# httpd -v
Server version: Apache/2.0.58
Server built: Jun 6 2006 06:59:29

[root@cp customapache]# php -v
PHP 4.4.2 (cli) (built: Jun 6 2006 07:17:29)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
with Zend Optimizer v3.0.1, Copyright (c) 1998-2006, by Zend Technologies
 
Hi guys,

Im trying to follow through with these instructions to get my Apache from 1. to 2.

Im getting the following when I run the step
./build apache_2

Any help would be greatful.

open.c: In function `apr_file_open_stderr':
open.c:242: error: `STDERR_FILENO' undeclared (first use in this function)
open.c:242: error: (Each undeclared identifier is reported only once
open.c:242: error: for each function it appears in.)
open.c: In function `apr_file_open_stdout':
open.c:250: error: `STDOUT_FILENO' undeclared (first use in this function)
open.c: In function `apr_file_open_stdin':
open.c:258: error: `STDIN_FILENO' undeclared (first use in this function)
make[4]: *** [open.lo] Error 1
make[4]: Leaving directory `/usr/local/directadmin/customapache/httpd-2.0.58/srclib/apr/file_io/unix'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/directadmin/customapache/httpd-2.0.58/srclib/apr/file_io/unix'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/directadmin/customapache/httpd-2.0.58/srclib/apr'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/directadmin/customapache/httpd-2.0.58/srclib'
make: *** [all-recursive] Error 1
 
Ok figured it out but not sure why my gcc wasnt picking up

/usr/include/unistd.h

I manually stuck it into all the apache src files that it complained about, im sure thats not a good way of doing it so would love to hear from you experts about possible reasons why this would happen... :)

[[ FIXED ..

Not sure about this one still but by updating my gcc
(yum update gcc-c++) I didnt have to do the manual fixes.

]]


ALSO I have seen previously in this thread that some users got stuck on teh following error.. Can someone let me know waht the actual fix was..

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1


[[ FIXED..

Finally figured this out, for some reason when I did a ./build it didn't create the

/usr/local/directadmin/customapache/libmcrypt-2.5.7/

I manually created it and it went through ok... Im slowly getting the hang of this stuff... just need to be logical lol ]]
 
Last edited:
Hey Wael


i did the things you said, but after I did all the steps and tried to restart the httpd service, i get the following error message for all my users

port was replaced with listen in apache 2.0
+
user cannot occur within <virtualhost> section

off course i can change it manually in every user's httpd.conf file, but that keeps me busy all night. :(

any other solution??


thank you very much


greetz T
 
that means your:

apache_ver=1.3

is still set in your /usr/local/directadmin/conf/directadmin.conf

or else it is there, but directadmin was not restarted.

Make sure:
apache_ver=2.0
is present and DA is restarted to ensure it uses the apache 2 virtualhost templates.

John
 
gncthomas said:
Hey Wael


i did the things you said, but after I did all the steps and tried to restart the httpd service, i get the following error message for all my users

port was replaced with listen in apache 2.0
+
user cannot occur within <virtualhost> section

off course i can change it manually in every user's httpd.conf file, but that keeps me busy all night. :(

any other solution??


thank you very much


greetz T

you need to fix all httpd.conf in
Code:
/usr/local/directadmin/data/usersold/
i fix for gnc0001000 to gnc0005000
just edit with nano & -w
then add # before port 80
and move User & Group from VirtualHost to down ServerRoot /etc/httpd
do it to all domain name :eek: & you have more then 80 domain.

Thomas now time 3:55am :o i need to sleep, PM if you want me to do it all ;)


Wael
 
Or the more humane method would be to ensure a correct apache_ver in your directadmin.conf, and simply type:
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
;)

John
 
DirectAdmin Support said:
Or the more humane method would be to ensure a correct apache_ver in your directadmin.conf, and simply type:
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
;)

John

John directadmin.conf ok, take look to this error
Code:
[root@s01 root]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: Syntax error on line 7 of /usr/local/directadmin/data/usersold/XXXXXXXXXX/httpd.conf:
Port was replaced with Listen in Apache 2.0
                                                           [FAILED]
i need to fix httpd.conf to all user



Wael
 
Ok.. so it looks like you're running an apache 2 binary? You can check by typing:

httpd -v

So you have to make sure it all matches up. If you want apche 2, then you need apache_ver=2.0 ... if you have apache_ver=1.3, then you also have to have httpd 1.3 binaries.

This might help if you are trying to revert back to 1.3:
http://help.directadmin.com/item.php?id=54

John
 
Hey John


I did all of the things above, so changed to version 2.0 in directadmin.conf and did the action to rewrite the conf files for all users and restarted directadmin like you told me.

But..... no luck

keep getting the same problem:
Starting httpd: Syntax error on line 7 of /usr/local/directadmin/data/usersold/gnc0006000/httpd.conf:
Port was replaced with Listen in Apache 2.0

when i ask for the version, I get the following:
Server version: Apache/2.0.58
Server built: Jul 10 2006 10:53:50


any help??


Or should i try to do the apache2.0 install from scratch?

greetz
 
Apache work fine 2.0.58

i fix all httpd.conf look like this
Code:
perl -pi -e 's/User/#User/' /usr/local/directadmin/data/xxxxxx/*/httpd.conf
perl -pi -e 's/Group/#Group/' /usr/local/directadmin/data/xxxxxx/*/httpd.conf
perl -pi -e 's/Port 80/#Port 80/' /usr/local/directadmin/data/xxxxxx/*/httpd.conf

and now i get error
Code:
Warning: DocumentRoot [/home/xxxxxx/domains/xxxxxx.xxx/public_html] does not exist
8 domain name :)
i need to delete this domain :o


Wael
 
i can't start DirectAdmin anymore...

Code:
[root@server5 directadmin]# service directadmin start
Starting DirectAdmin: /usr/local/directadmin/directadmin: /usr/local/directadmin/directadmin: cannot execute binary file
                                                           [FAILED]

Everything else is working fine... Apache 2.*

directadmin.conf is good.. everything is good but he's not starting... :(
 
Code:
/usr/local/directadmin/conf/directadmin.conf
Search for apache_ver=1.3 and remove it and keep apache_ver=2.0
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

tested in some server before.


Wael
 
i think i have a different problem...

cannot execute binary file doesn't sound good :(
 
under debian sarge, I had to create the configure.php.ap2 myself, I just copied the configure.php and modified apxs to apxs2, seems to work..
 
hey when I last upgraded to apache 2 it took off my php command, now I have to call it from /usrl/local/bin/php
Anyway to fix this?
 
Back
Top