Forum Moderators: phranque
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
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.
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.