Click to See Complete Forum and Search --> : Apache Question


Dru Lee Parsec
12-14-2000, 03:25 PM
Hi folks. I posted this over on the Web forum but there's not much traffic there. I hope that sombody can help my on this 'cause I really need to get Apache up and running on this box. Here's what's up:

I have these lines in my httpd.conf file

## mod_jserv has to be _BEFORE_ mod_rewrite
<IfDefine HAVE_JSERV>
LoadModule jserv_module /usr/lib/apache/mod_jk.so
</IfDefine>

And the module mod_jk.so DOES exist in that directory. But when I try to start apache with this command:

/etc/rc.d/init.d/httpd start

I get this error :

Syntax error on line 77 of /etc/httpd/conf/httpd.conf
Can't locate API module structure 'jserv_module' in file /usr/lib/apache/mod_jk.so:
/usr/lib/apache/mod_jk.so: undefined symbol: jserv_module

Any help would be greatly appreciated.

YaRness
12-14-2000, 04:13 PM
i don't know enough abot apache, but that mod_jk.so file IS getting successfully FOUND, there is just a problem within that file. when that module is loaded, the module returns the error

/usr/lib/apache/mod_jk.so: undefined symbol: jserv_module


so something is wrong internally in mod_jk.so

since i have no idea what that is coded in, or even what it does, can't help ya. but the file is in the right place.

------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/
------------------

nanode
12-14-2000, 04:20 PM
Dru Lee:

./httpd -l

will list the modules that are loaded. Do that for sanity check.

Also, it's a better habit to stop/start/restart apache using
./apachectl followed by stop start etc. It's much safer/gentler

I've not played w/ jserv, but if the module is in fact loaded I agree w/ what yarness said.

Good Luck.

Dru Lee Parsec
12-14-2000, 05:41 PM
./httpd -l (Is that an "L") tells me that there is no -l flag, I get a USAGE message saying that valid entries are things like start, stop, restart, and so on.

nanode
12-14-2000, 05:46 PM
'L' as in LINUX, but it needs to be lowercase

Dru Lee Parsec
12-14-2000, 05:47 PM
Nope, I'm typing this:

/etc/rc.d/init.d/httpd -l

as root and it's saying that this is not one of the valid arguments.

nanode
12-14-2000, 05:48 PM
This is from my FreeBSD box, but it's the same thing:

> ./httpd -l
Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_access.c
mod_auth.c
mod_setenvif.c
mod_php4.c
suexec: disabled; invalid wrapper /usr/local/apache/bin/suexec

Dru Lee Parsec
12-14-2000, 05:51 PM
What directory are you in when you type that?

That's strange, my apache says there is no -l argument.

nanode
12-14-2000, 07:03 PM
/usr/local/apache/bin/

your's may vary, but you NEED to run the one in your apache's bin/

that's why explicitly using (also in the apache/bin/) apachectl (last char = L) is safer, since you won't get confused with any distro-specific init crap.

A lot of distros have an httpd init script that correctly launches your http server and shuts it down at a given run level. That is all well in good, but this could vary by distro and I can't assume that it takes the same args as the one in {$your_apache_dir}/bin/

PLBlaze
12-14-2000, 07:38 PM
Are you trying to configure apache with jserv to serve .jsp pages? Strange because i have mod_jserv.so...nerver heard of mod_jk.so http://www.linuxnewbie.org/ubb/confused.gif.All i did is put a line at the end of httpd.conf pointing to jserv.conf in a different directory.

klamath
12-14-2000, 08:02 PM
That's strange, my apache says there is no -l argument.

You're executing the SysV init script -- that's just a shell script. You want the real stuff in /usr/local/apache/, depending on where you installed it.

Also, you mentioned in another conf you installed this from RPM. NEVER use Apache from RPM. It's nothing but a truckload of problems. And in most cases, you'll want to compile modules into Apache statically, rather than using DSOs - that means you'll need to recompile Apache to add or upgrade modules. I always keep a copy of the Apache source tree and any relevant extensions on my webservers.

------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the Better Bulletin Board (http://bbb.sourceforge.net)

Dru Lee Parsec
12-14-2000, 08:38 PM
I don't have a /usr/local/apache directory I have an /etc/httpd directory though.

I think I may have to re-instll everything and recompile to get rid of the stupidity that the RPMs gave me.

Can you believe that it set the DocumentRoot to var/www/html !!!??? What the hell is that? htdocs doesn't even exist in this installation!

OK, I'm going to go get the source code and install and compile it. Enough fscking around.

Dru Lee Parsec
12-14-2000, 08:42 PM
BTW, what's the latest version I should look for? I see 1.3.14 at the apache site and then a bunch of 2.0a6 thru 2.0a9.

What is the latest stable version?

klamath
12-14-2000, 09:47 PM
1.3.14 is the latest stable version.

2.0 will seriously rock, but it's no where near production quality yet.

------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the Better Bulletin Board (http://bbb.sourceforge.net)

Sweede
12-15-2000, 12:21 AM
Although i would agree i wouldnt do apache from RPM(or anything other than straight source), the problem isnt apache, its your java modules.

how did you get those on your server ?

i tried compiling them on my redhat machine to help you in the web forum, but i couldnt figure out what to download since the apache jserv documentation doesnt really say.

nanode
12-15-2000, 12:09 PM
Dru:

Slackware installs apache in a similar way by default. the actual http server is someplace under /var/

As a rule of habit, I delete that and begin from scratch w/ a source tarball in /usr/local. It makes life a tone easier if/when I restore backups or upgrade. (/usr/local is strictly stuff YOU installed personally)

However, I can see some value in having your htdoc root under /var.

It's all preference, but there definately are 'mainstream' ways of doing this, as this thread indicates.

Dru Lee Parsec
12-15-2000, 03:04 PM
I wiped the old Apache off and d-loaded the source and went throught the configure, make, make install ritual.

It works great and everything is where I expect it to be.

I need to d-Load the Apache JServ module and build that (No mor RPMs for me).

Boy! It really seems that the whole problem was with the RPM install. Doing it from source is, of course, the safest way, but I wouldn't have expected the RPM installation to be so fubar'd.

nanode
12-15-2000, 04:01 PM
Dru Lee:

Apache source is necessary if you ever want to compile in a new module. .rpm, .deb are great for a lot of apps, but for something that is so highly configurable, like a web server, source is definately the way to go.

Glad to see you got it working.

I've messed around a bit w/ DNS and apache virtual hosting. If you ever go there, let me know, I'll be happy to share any config files or help you out.