LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 07-17-2001, 01:26 AM   #1
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 21
Posts: 357

Rep: Reputation: 30
apachectl configtest ... blah


i had a working version of apache a little earlier today, but i followed a recommendation to get phpBB and ran into a bit of trouble

i just had a basic apache version, no perl, no php - so i had to install that (in that order).

i began with perl5.005_03 and php 4.0.6. perl seemed to have installed fine, but php had a little trouble. it worked, but my php pages aren't coming out in php. so i decided to see if this was an apachectl restart issue and tried that.

that's when i saw that there were problems.

first, i got the following error (when running configtest as instructed)

./apachectl configtest
Syntax error on line 332 of /usr/local/apache/conf/httpd.conf:
Invalid command 'Order', perhaps mis-spelled or defined by a module not included
in the server configuration

i checked on google for this problem and saw that the solution was to insert the following line in httpd.conf:

LoadModule access_module /libexec/mod_access.so

that was fine, but i then got more errors when trying to restart httpd:

[Tue Jul 17 01:15:43 2001] [warn] Loaded DSO libexec/mod_access.so uses plain Ap
ache 1.3 API, this module might crash under EAPI! (please recompile it with -DEA
PI)
Syntax error on line 474 of /usr/local/apache/conf/httpd.conf:
Invalid command 'LogFormat', perhaps mis-spelled or defined by a module not incl
uded in the server configuration

so i'm sure i'll run into a loop here, and i don't know what to do at this point. i've tried reinstalling apache to no avail.

can someone please give me step by step instructions on how to fix this? it seems to have worked before. i can't figure out why it's not working now.

thanks.
 
Old 07-17-2001, 04:48 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Post your httpd.conf file, that way we can have a look at whats up. That module you've change (mod_access) did you just change httpd.conf of have you downloaded someone elses module? From the error it sounds like the module was built for an older Apache API

cheers

Jamie...
 
Old 07-17-2001, 10:58 AM   #3
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 21
Posts: 357

Original Poster
Rep: Reputation: 30
i didn't change mod_access. i just added that line. it's not there in the httpd.conf file below, however (i commented it out). this is the file that i'm using with the Order error. note that i added mod_access.c to the bottom; i can't figure out where a more appropriate place is for it. it's also commented out right now (using it and mod_access.so only causes more problems).

[edited for brevity, extra comments removed]

### Section 1: Global Environment

ServerType standalone
ServerRoot "/usr/local/apache"

PidFile /usr/local/apache/logs/httpd.pid
ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0

#i commented out this line because of the problems it gave me
#LoadModule access_module libexec/mod_access.so
LoadModule php4_module libexec/libphp4.so


### Section 2: 'Main' server configuration

Port 80
User nobody
Group nobody
ServerAdmin <email address removed>
DocumentRoot "/var/www/html"

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/var/www/html">

Options Indexes FollowSymLinks MultiViews
AllowOverride None

# THIS IS WHERE MY ERROR BEGINS:
# Controls who can get stuff from this server.

Order allow,deny
Allow from all
</Directory>

#end of first error

<IfModule mod_userdir.c>
UserDir public_html
</IfModule>

<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>


AccessFileName .htaccess

<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

UseCanonicalName On

<IfModule mod_mime.c>
TypesConfig /usr/local/apache/conf/mime.types
</IfModule>

DefaultType text/plain

<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/apache/conf/magic
</IfModule>

HostnameLookups Off

ErrorLog /usr/local/apache/logs/error_log

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combine
d
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog /usr/local/apache/logs/access_log common

ServerSignature On

<IfModule mod_alias.c>
<Directory "/usr/local/apache/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</IfModule>


<IfModule mod_autoindex.c>
IndexOptions FancyIndexing
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^

AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif
ReadmeName README
HeaderName HEADER
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
</IfModule>

<IfModule mod_mime.c>

AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage zh-tw .tw
AddLanguage tw .tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8

<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca
es sv tw
</IfModule>

AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

AddType application/x-tar .tgz
</IfModule>


<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>


#tried this, didn't work:

#AddModule mod_access.c
 
Old 07-17-2001, 01:25 PM   #4
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 21
Posts: 357

Original Poster
Rep: Reputation: 30
..and having no patience is bad. i'm seriously considering uninstalling apache, perl, and php.

(my server is up, but the text right now is not even in english.)

thoughts on what may be wrong? (just so i know that i'm not the only one who has page views on this thread. )
 
Old 07-17-2001, 03:44 PM   #5
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Here what I've got in my httpd.conf (just bits of it)
Code:
LoadModule auth_module        libexec/mod_auth.so
...
LoadModule php4_module        libexec/libphp4.so
...
AddModule mod_auth.c
AddModule mod_auth_anon.c
AddModule mod_auth_dbm.c
...
AddModule mod_php4.c
...
<Directory />
    Options FollowSymLinks ExecCGI Indexes
    AllowOverride None
    FancyIndexing off
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/lib/apache/htdocs">

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
    Options Indexes FollowSymLinks ExecCGI

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
    AllowOverride AuthConfig Options

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all
</Directory>

<Directory "/var/lib/apache/htdocs/resources">
  AuthName        "Jamie's Server"
  AuthType        Basic
  AuthUserFile    /var/lib/apache/auth/passwd
  AuthGroupFile   /dev/null

  require valid-user
</Directory>
...
    #
    # And for PHP 4.x, use:
    #
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
And my php and user authentication works fine. But it seems pretty similar to yours on the allow,deny front. What other modules do you have loading and do they work?

cheers

Jamie...
 
Old 07-17-2001, 03:54 PM   #6
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 21
Posts: 357

Original Poster
Rep: Reputation: 30
well, all i've got is what i posted. i'm not really sure what half of them do.

do you suggest that i just uninstall and then reinstall apache?

actually, if you're able, can you show me the complete list of LoadModule / AddModule combinations you have so i can check what should be there?

thanks
 
Old 07-17-2001, 09:18 PM   #7
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Rep: Reputation: 30
Which line is 332?
 
Old 07-18-2001, 12:23 PM   #8
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 21
Posts: 357

Original Poster
Rep: Reputation: 30
332 was this:

# THIS IS WHERE MY ERROR BEGINS:
# Controls who can get stuff from this server.

Order allow,deny
Allow from all
</Directory>

i just decided to uninstall/reinstall apache, and it worked. php and perl are looking good too.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad Display Name balh.blah.blah.com in remove command 0.o *BSD 2 12-08-2004 02:37 PM
Expanding file names in a script? ../blah -> /home/blah Bebo Linux - General 24 03-29-2004 06:39 PM
ln -s smbspool /blah/blah/hugh? wlfdgcrkz Linux - Networking 0 06-24-2003 01:29 AM
apachectl sopiaz57 Linux - Software 5 04-11-2003 07:11 PM
newbie issues....kernel panic: blah blah blah Rio Nishida Slackware 16 11-29-2002 01:08 AM


All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration