soup4you2
September 2nd, 2003, 23:03
ok i'm a bit of a loss here... running fbsd and normally when you just goto /usr/ports/www/mod_php4 and install it, it installs apache and php4 just fine.. well i did that and chrooted apache.. works fine... now when i go to add in php4 i get this..
[code:1:cb29d25c75]
bash-2.05b# /usr/local/etc/rc.d/apache.sh start
apacheSyntax error on line 33 of /usr/local/www/conf/httpd.conf:
Cannot add module via name 'mod_php4.c': not in list of loaded modules
[/code:1:cb29d25c75]
here's my httpd.conf so far
*** CONF REMOVED****
i cant for the life of me remember what i did last time
and if i add in
[code:1:cb29d25c75]
LoadModule php4_module libexec/apache/libphp4.so
[/code:1:cb29d25c75]
i get:
apacheSyntax error on line XXX of /usr/local/www/conf/httpd.conf:
Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not included in the server configuration
optyk
September 2nd, 2003, 23:19
will php load if you run apache not chrooted?
soup4you2
September 2nd, 2003, 23:31
will php load if you run apache not chrooted?
indeed...
once i figure this out it should be simple getting options like mod_security and other misc things setup and working
soup4you2
September 3rd, 2003, 00:12
got it werkin :)
i wish i could explain easily what i went though to get it to work... but basically i had to reconfigure it by hand and specificly tell it to include php and place a .configure_done file in place and copy a ton of libs i didnt have before along w/ the new httpd executable..
soup4you2
September 3rd, 2003, 09:12
so would anybody happen to know why when you put apache inside a chroot you can no longer use the LoadModule command in the configuration file?
K here's a rundown of what i did to get apache to work with these modules..
we will take php/ssl/and mod_security for an example here
I went into each mod port tree and did a make.. but did not install them
then went into /usr/ports/apache13-modssl
ran a make then after it was done configuring and beginning to build i broke outta it..
i did this mostly because i was too lazy to place a .configure_done.apache+mod_ssl-1.3.28+2.8.15_1._usr_local and patch it myself
changed dirs to work/apache13
ran make clean
then went into src/modules
and mkdir php4
cp -R /usr/ports/www/mod_php4/work/php-4.3.3/.libs/* .
cp -R /usr/ports/www/mod_php4/work/php-4.3.3/* .
mkdir ./extra/mod_security
cp /usr/ports/www/mod_security/work/mod_security-1.5.1/apache1/* ./extra/mod_security
cd ssl && make
then go back into the apache working directory.. and run
./configure --prefix=/usr/local/www --disable-module=all --server-uid=www --server-gid=www --enable-module=access --enable-module=log_config --enable-module=dir --enable-module=mime --enable-module=auth --activate-module=src/modules/extra/mod_security --enable-module=security --activate-module=src/modules/php4/libphp4.so --enable-module=ssl --with-layout=FreeBSD
cd ../.. ; make
it will error out.. thats ok
cd back into work/apachex.x.x/src/modules/extra/mod_security
cp mod_security.o ../
now go back and run make
it shoudl run fine..
then run make package
and congrats your ready to build your chroot tree and make your ssl certs.
i'm sure there are easier ways of doing this but hey i spent around 4 hours figuring a way that would work...
when i get back from vacation i'll try to write up a small howto on doing this and building your chroot tree...
**update**
you cant use the LoadModule directive unless you include the mod.so