Forum Moderators: phranque

Message Too Old, No Replies

apache conf issues

hoards of syntax errors

         

sano

8:30 pm on Dec 22, 2004 (gmt 0)

10+ Year Member



I've been trying to get Apache to run maybe a cumulative 7 hours now. It runs fine, however it doesn't use the correct config file.

I get this a lot:
# /usr/local/apache/bin/httpd -f /usr/local/apache/conf/new.conf
Syntax error on line 4 of /usr/local/apache/conf/new.conf:
Invalid command 'ServerType', perhaps mis-spelled or defined by a module not included in the server configuration

It also says "Allow" and "Order" are invalid. What's going on here? I've hunted all over the web and I can't seem to find anyone who has had the same problem as me. I'm running FreeBSD 5.1 on x86. I've tried Apache 1.3.28, 1.3.33, and 2.0.52.

Thanks

MattyMoose

8:43 pm on Dec 22, 2004 (gmt 0)

10+ Year Member



Hi sano! Welcome to WebmasterWorld!

If you're using FreeBSD, did you install Apache from ports (

/usr/ports/www/apache*
), or manually from source?

It looks like you've built it from source (telling from the path you're using of /usr/local/apache). If you have built it from ports, then the config file you're looking for (and should probably use) is located at

/usr/local/etc/apache
.

I'd recommend check out the Handbook [freebsd.org], and check out how to Install Software [freebsd.org] and in particular, section 4.5.5 (Upgrading ports).

If you know how to do this already, I apologize, and maybe we can figure it out.

sano

10:15 pm on Dec 22, 2004 (gmt 0)

10+ Year Member



Yes! That worked, thank you so much!

I had to install from source since apparently 5.1 isn't supported on the ports FTP anymore (directory is missing). I'll have to upgrade to 5.2 or whatevers out now.

Thank you!

MattyMoose

10:33 pm on Dec 22, 2004 (gmt 0)

10+ Year Member



You're very welcome! My pleasure to help.

I should point out, though, that the ports system is separate from the base installation (aka "FreeBSD"). You can, and should, update the ports system on a regular basis without upgrading your whole system. Check out that section 4.5.5 in the handbook, and it'll show you how to use cvsup with portupgrade to upgrade your ports.

Also, if you're having trouble building something from ports, you can also install the package (prebuilt binaries), if you haven't updated any of the other ports. So, say you installed from CD, and haven't run cvsup & portupgrade, what you could do is do a

pkg_add -r "apache13"
, which will install a pre-built binary installation of apache with the most common options onto your system. This isn't the best way to go about things, since the ports system is kept much more up to date than the packages.