You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Bryan Irvine <br...@kingcountyjournal.com> on 2003/12/22 17:45:47 UTC

[users@httpd] oops i busted apache

I busted my apache.

I tried to do an upgrade and now I get this error when I start apache:
#####
Starting httpd2: Syntax error on line 1018 of
/etc/httpd/2.0/conf/commonhttpd.conf: 
Invalid command 'ScriptAlias', perhaps mis-spelled or defined by a
module not included in the server configuration
                                                                [FAILED]
#####

The offending part of that file is this:
#####
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory /usr/local/nagios/sbin/>
        Authtype Basic
        Authname "Nagios Console"
        AuthuserFile /usr/lib/apache/passwords/.nagiospasswd
        Require user admin
        AllowOverride None
        Options ExecCGI
        order allow,deny
        allow from all
</Directory>

<Directory /var/www/html/acid/>
        Authtype Basic
        Authname "ACID Console"
        AuthUserFile /usr/lib/apache/passwords/.acidpasswd
        Require user admin
        AllowOverride None
</Directory>
#####

Ideas?  The module seems to be running an in place, but I'll try
anything.

--Bryan


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] oops i busted apache

Posted by Robert Andersson <ro...@profundis.nu>.
Bryan Irvine wrote:
> Weird stuff.  I'm sure Jonas is right about the mime_magic thing
> on the second problem.  All is working now though.  *phew*

Yes, he most likely is. I considered if mime_magic could be doing it, but
thought that the upgrade would have written a default configuration file,
where mime_magic shouldn't be enabled. I better work on disabling
mod_assumption ;)

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] oops i busted apache

Posted by Bryan Irvine <br...@kingcountyjournal.com>.
After a quick double check, I am in fact using mime_magic, er...rather
apache is.  Perhaps the upgrade made that active, and since my html file
was never really a valid one to begin with caused that problem.  

And to answer Roberts rpm question: Upgrades theoretically keep your
current settings, and I've never had them overwritten before.  But all 3
of the *required* modules for instance were commented out during the
upgrade.  

Weird stuff.  I'm sure Jonas is right about the mime_magic thing on the
second problem.  All is working now though.  *phew*

--Bryan

On Tue, 2003-12-23 at 11:26, Jonas Eckerman wrote:
> On Tue, 23 Dec 2003 20:10:21 +0100, Robert Andersson wrote:
> 
> > > > >  html file was malformed, apache just didn't notice until
> 
> >  (the Content-Type header)? Apache will normally not care about the
> >  file's content at all.
> 
> It's possible hes's using MIME magic for file types. If the HTML file was malformed, couldn't that have made the MIME magic module make a bad guess (or possibly just give up)?
> 
> Regards
> /Jonas


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] oops i busted apache

Posted by Jonas Eckerman <jo...@frukt.org>.
On Tue, 23 Dec 2003 20:10:21 +0100, Robert Andersson wrote:

> > > >  html file was malformed, apache just didn't notice until

>  (the Content-Type header)? Apache will normally not care about the
>  file's content at all.

It's possible hes's using MIME magic for file types. If the HTML file was malformed, couldn't that have made the MIME magic module make a bad guess (or possibly just give up)?

Regards
/Jonas

-- 
Jonas Eckerman, jonas_lists@frukt.org
http://www.fsdb.org/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] oops i busted apache

Posted by Robert Andersson <ro...@profundis.nu>.
Bryan Irvine wrote:
> [Robert Andersson wrote:]
> > Bryan Irvine wrote:
> > > Ok I managed to get it all working again.  [...] Then the html file
> > > was malformed, apache just didn't notice until after the upgrade.
> >
> > And, I bet it doesn't notice after the upgrade either. Apache has no
> > concept of HTML except as a MIME-type, which probably was
> > the original problem in one way or another.
>
> I'm not sure why it wouldn't work until I wrapped my meta tag in html;
> like so
>
> <html>
> <meta refresh blah blah>
> </html>
>
> Then it finally started working.

Ah, the change in the HTML did probably only affect the *browser*, not
Apache. Your problem might be that Apache isn't sending a "text/html"
MIME-type, why the browser might display it as text unless it finds an
<html> tag. That is, wrong Content-Type is sent with the file.

See if you can verify that theory, either by telnetting and manually request
it and watch the response, or use Mozilla Firebird with the Live HTTP
Headers plugin:
    http://www.mozilla.org/products/firebird/

http://extensionroom.mozdev.org/extensionlist.php?app=Firebird#livehttpheaders

> But, I couldn't even get that far until I uncommented a bunch of
> lines from my httpd2.conf that were commented out for some reason
> (that's what I get for upgrading from mandrake rpm's instead of from
> source ;-), and for not keeping up to date backups).

Did the RPM update cause httpd.conf to be replaced? Is that normal behaviour
for these RPMs, or is it a bug?

> As for why the file wouldn't work...I dunno, apache was just sending
> it out as a different mime-type until it had the html tags in it.  The
file
> was working the way it was for a year and half just the way it was.

Are you sure Apache is currently sending the corrent mime-type (the
Content-Type header)? Apache will normally not care about the file's content
at all.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] oops i busted apache

Posted by Robert Andersson <ro...@profundis.nu>.
[just picking ;)]

Bryan Irvine wrote:
> Ok I managed to get it all working again.  [...] Then the html file was
> malformed, apache just didn't notice until after the upgrade.

And, I bet it doesn't notice after the upgrade either. Apache has no concept
of HTML except as a MIME-type, which probably was the original problem in
one way or another.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] oops i busted apache

Posted by Bryan Irvine <br...@kingcountyjournal.com>.
Ok I managed to get it all working again.  There was a few required
modules that were commented out. Then the html file was malformed,
apache just didn't notice until after the upgrade.

Thanks for your help!

--Bryan

On Mon, 2003-12-22 at 09:43, Bryan Irvine wrote:
> ok I managed to get it started.  It's still busted pretty good though.
> 
> I think my httpd2.conf file is whacked (no backup :-/ damn).
> 
> now I can actually browse to my site, but it just displays the contents
> of the index.html file
> 
> ###
> <meta HTTP-EQUIV=refresh content="0; URL=http://munged.url.com/nagios">
> ###
> 
> That one line is all that's in my index.html, why would it jsut display
> instead of execute?
> 
> --Bryan (aka "vigorously reading every line of httpd2.conf") 
> 
> 
> On Mon, 2003-12-22 at 09:25, Luis Fernando Gallegos Valencia wrote:
> > Try writing scriptalias with quotes
> > Example:	
> > ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
> > 	
> > 	Luis
> > 
> > 
> > On Mon, 2003-12-22 at 11:45, Bryan Irvine wrote:
> > > I busted my apache.
> > > 
> > > I tried to do an upgrade and now I get this error when I start apache:
> > > #####
> > > Starting httpd2: Syntax error on line 1018 of
> > > /etc/httpd/2.0/conf/commonhttpd.conf: 
> > > Invalid command 'ScriptAlias', perhaps mis-spelled or defined by a
> > > module not included in the server configuration
> > >                                                                 [FAILED]
> > > #####
> > > 
> > > The offending part of that file is this:
> > > #####
> > > ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
> > > <Directory /usr/local/nagios/sbin/>
> > >         Authtype Basic
> > >         Authname "Nagios Console"
> > >         AuthuserFile /usr/lib/apache/passwords/.nagiospasswd
> > >         Require user admin
> > >         AllowOverride None
> > >         Options ExecCGI
> > >         order allow,deny
> > >         allow from all
> > > </Directory>
> > > 
> > > <Directory /var/www/html/acid/>
> > >         Authtype Basic
> > >         Authname "ACID Console"
> > >         AuthUserFile /usr/lib/apache/passwords/.acidpasswd
> > >         Require user admin
> > >         AllowOverride None
> > > </Directory>
> > > #####
> > > 
> > > Ideas?  The module seems to be running an in place, but I'll try
> > > anything.
> > > 
> > > --Bryan
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > > 
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] oops i busted apache

Posted by Bryan Irvine <br...@kingcountyjournal.com>.
ok I managed to get it started.  It's still busted pretty good though.

I think my httpd2.conf file is whacked (no backup :-/ damn).

now I can actually browse to my site, but it just displays the contents
of the index.html file

###
<meta HTTP-EQUIV=refresh content="0; URL=http://munged.url.com/nagios">
###

That one line is all that's in my index.html, why would it jsut display
instead of execute?

--Bryan (aka "vigorously reading every line of httpd2.conf") 


On Mon, 2003-12-22 at 09:25, Luis Fernando Gallegos Valencia wrote:
> Try writing scriptalias with quotes
> Example:	
> ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
> 	
> 	Luis
> 
> 
> On Mon, 2003-12-22 at 11:45, Bryan Irvine wrote:
> > I busted my apache.
> > 
> > I tried to do an upgrade and now I get this error when I start apache:
> > #####
> > Starting httpd2: Syntax error on line 1018 of
> > /etc/httpd/2.0/conf/commonhttpd.conf: 
> > Invalid command 'ScriptAlias', perhaps mis-spelled or defined by a
> > module not included in the server configuration
> >                                                                 [FAILED]
> > #####
> > 
> > The offending part of that file is this:
> > #####
> > ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
> > <Directory /usr/local/nagios/sbin/>
> >         Authtype Basic
> >         Authname "Nagios Console"
> >         AuthuserFile /usr/lib/apache/passwords/.nagiospasswd
> >         Require user admin
> >         AllowOverride None
> >         Options ExecCGI
> >         order allow,deny
> >         allow from all
> > </Directory>
> > 
> > <Directory /var/www/html/acid/>
> >         Authtype Basic
> >         Authname "ACID Console"
> >         AuthUserFile /usr/lib/apache/passwords/.acidpasswd
> >         Require user admin
> >         AllowOverride None
> > </Directory>
> > #####
> > 
> > Ideas?  The module seems to be running an in place, but I'll try
> > anything.
> > 
> > --Bryan
> > 
> > 
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] oops i busted apache

Posted by Luis Fernando Gallegos Valencia <lf...@pichincha.com>.
Try writing scriptalias with quotes
Example:	
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
	
	Luis


On Mon, 2003-12-22 at 11:45, Bryan Irvine wrote:
> I busted my apache.
> 
> I tried to do an upgrade and now I get this error when I start apache:
> #####
> Starting httpd2: Syntax error on line 1018 of
> /etc/httpd/2.0/conf/commonhttpd.conf: 
> Invalid command 'ScriptAlias', perhaps mis-spelled or defined by a
> module not included in the server configuration
>                                                                 [FAILED]
> #####
> 
> The offending part of that file is this:
> #####
> ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
> <Directory /usr/local/nagios/sbin/>
>         Authtype Basic
>         Authname "Nagios Console"
>         AuthuserFile /usr/lib/apache/passwords/.nagiospasswd
>         Require user admin
>         AllowOverride None
>         Options ExecCGI
>         order allow,deny
>         allow from all
> </Directory>
> 
> <Directory /var/www/html/acid/>
>         Authtype Basic
>         Authname "ACID Console"
>         AuthUserFile /usr/lib/apache/passwords/.acidpasswd
>         Require user admin
>         AllowOverride None
> </Directory>
> #####
> 
> Ideas?  The module seems to be running an in place, but I'll try
> anything.
> 
> --Bryan
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org