LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-13-2004, 05:21 PM   #1
dwig365
LQ Newbie
 
Registered: Jun 2004
Distribution: RedHat, Fedora Core 4, SuSe 10.0, Mandriva 2006.6, Slackware, Ubuntu
Posts: 29

Rep: Reputation: 15
httpd wont work


here is my error from terminal

Quote:
Starting httpd: [Mon Dec 13 17:18:40 2004] [warn] The Alias directive in /etc/httpd/conf/httpd.conf at line 473 will probably never match because it overlaps an earlier AliasMatch.
[FAILED]

Last edited by dwig365; 12-13-2004 at 06:53 PM.
 
Old 12-13-2004, 06:12 PM   #2
pumazi
LQ Newbie
 
Registered: Nov 2004
Location: Pittsburgh, PA, USA
Distribution: Gentoo
Posts: 22

Rep: Reputation: 15
I'm gonna take a stab by saying, tell us what line 492 looks like because it could be diferent in your file from ours...
and also if you can find the overlap tell us what it looks like... and you may even figure it out yourself once you find those 2 things
 
Old 12-13-2004, 06:53 PM   #3
dwig365
LQ Newbie
 
Registered: Jun 2004
Distribution: RedHat, Fedora Core 4, SuSe 10.0, Mandriva 2006.6, Slackware, Ubuntu
Posts: 29

Original Poster
Rep: Reputation: 15
line 473 is:
Quote:
Alias /manual "/var/www/manual"
 
Old 12-13-2004, 09:58 PM   #4
dwig365
LQ Newbie
 
Registered: Jun 2004
Distribution: RedHat, Fedora Core 4, SuSe 10.0, Mandriva 2006.6, Slackware, Ubuntu
Posts: 29

Original Poster
Rep: Reputation: 15
anyone?
 
Old 12-13-2004, 11:24 PM   #5
GinEric
Member
 
Registered: Nov 2004
Location: Earth
Distribution: Slackware 10, et ux
Posts: 36

Rep: Reputation: 15
Apparently, you have either two aliases that are the same, one before line 473 and one in line 473, or, you've inadvertently aliased and alias! That's a no-no.

both are no-no's

Comment out the alias and see if it works.
Then find the other alias causing it to fail.

Don't you hate it when programmers tell you line #473 failed and none of the lines are numbered?

BTW, Apache comes default with the alias for the directory for the manual. A Directory directive that you should easily be able to find.

Looking back, I think you tried to add another alias for the Apache manual when one already existed.

There is also a command to check your httpd.conf file,

apachectl configtest


Last edited by GinEric; 12-13-2004 at 11:31 PM.
 
Old 12-14-2004, 03:55 PM   #6
dwig365
LQ Newbie
 
Registered: Jun 2004
Distribution: RedHat, Fedora Core 4, SuSe 10.0, Mandriva 2006.6, Slackware, Ubuntu
Posts: 29

Original Poster
Rep: Reputation: 15
nop, it didn't work. does anybody have a default httpd.conf that was included in fc3 and it works? please put it on here. thanks
 
Old 12-14-2004, 04:17 PM   #7
Inexactitude
Member
 
Registered: Oct 2003
Distribution: Slackware 12.2, Ubuntu 9.04
Posts: 477

Rep: Reputation: 30
I'm sorry but I don't think you can upload to this server. Sorry but I don't have any fc3 configs, but I do have a mandrake and freebsd 5.2 if you're at all interested. I can email them to you.

By the way, are you sure that the error you're seeing is causing the failure because it says it's just a warning. Don't know about that though.

For now, I'll take a look at my apache configs and see if I can pick apart your problem.
 
Old 12-15-2004, 04:01 PM   #8
GinEric
Member
 
Registered: Nov 2004
Location: Earth
Distribution: Slackware 10, et ux
Posts: 36

Rep: Reputation: 15
If commenting out the aliases didn't work, you're either in the wrong config file or running the wrong Apache.

Did you reinstall?

Did you, by chance, compile Apache?

Did you shell the command apachectl configtest

If the configtest works, but start fails, you have to be in the wrong config, that is, your symlink points maybe to newer or older Apache.
#___________________________
Here's the alias directive for manual:

Alias /manual/ "/var/www/htdocs/manual/"

<Directory "/var/www/htdocs/manual">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#____________________________

Look at the difference in your alias, no final oblique strokes. But also, if you comment the entire script above, it cannot be in this alias and you've eliminated at least one possibility.

Why don't you post your alias scripts from httpd.conf and we'll have a look at them.

BTW, if you get the Apache tarball for fc3 for the version your running, untar to a temp directory, copy the httpd.conf in the tarball, you'll have the default config. Then, just delete the directory you untarred it to. Don't forget to first copy your current httpd.conf as something like httpd.conf.old

Try again, post your aliases. It's got to be what Apache says, a bad alias.
 
Old 01-29-2005, 10:26 PM   #9
scotter
LQ Newbie
 
Registered: Jan 2005
Location: Midlands, UK
Posts: 6

Rep: Reputation: 0
I ran into exactly the same problem after upgrading from RH9 to Fedora Core 3.
The problem appears to be because of manual.conf which now exists in /etc/httpd/conf.d/
The default httpd.conf includes *.conf files within this directory.

I just renamed mine out the way and apache stopped moaning
 
Old 02-10-2005, 12:29 AM   #10
GinEric
Member
 
Registered: Nov 2004
Location: Earth
Distribution: Slackware 10, et ux
Posts: 36

Rep: Reputation: 15
Somebody really needs to read Julius Caesar here!

Divide and Conquer; tell the people that they need the Roman Legions and an Emperor for their personal safety, and anyone who thinks that war is not the ugliest thing, they apparently have not seen a two-year old baby girl burned to death by napalm, or a Sharon missile blowing up another two-year old baby girl and getting away with such war crimes citing their "patriotism."

For God's sake, get off the war kick.
 
Old 02-10-2005, 05:04 AM   #11
scotter
LQ Newbie
 
Registered: Jan 2005
Location: Midlands, UK
Posts: 6

Rep: Reputation: 0
WTF GinEric?
 
Old 02-27-2005, 10:16 PM   #12
GinEric
Member
 
Registered: Nov 2004
Location: Earth
Distribution: Slackware 10, et ux
Posts: 36

Rep: Reputation: 15
Sorry if you misunderstood, that response was elicited from Inexactitude's signature. I'm just never in the mood for war commentaries about who is and who is not brave. My apologies. I just don't think bombing two year olds, or killing 13 or 14 year olds can be justified by anyone, and epithets aimed at people who don't participate in such war crimes do not belong in a legitimate forum.

I remember 10,000 veterans who marched against Viet Nam after serving numerous terms there. They were far from cowards; the coward is the one who obeys all orders without question out of fear that he will be imprisoned or publicly humiliated by someone who has no conscience and has probably never been in a real battle.

I've had enough war; anyone else?

As for the httpd question, we run two Apache's on the same server. One for the WAN and one for the LAN. Simply renamed them httpd2 and httpd1 and their controls apache2ctl and apache1ctl. They run out of completely different trees and do not know of each others existence.

Partially, it is the "alias" that allows this to work. If the error report says you already have an alias for that directory, then you already have an alias for that directory. That is the problem is it trying to tell you about.

Apache installs with its manual by default. That manual is not under htdocs, but directly under Apache. So, if you try to alias the default, and license required, install, it's going to at least burp!

Path to manual before 2.0:

<IfModule mod_alias.c>

#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

# This Alias will project the on-line documentation tree under /manual/
# even if you change the DocumentRoot. Comment it if you don't want to
# provide access to the on-line documentation.
#
Alias /manual/ "/var/www/htdocs/manual/"

<Directory "/var/www/htdocs/manual">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

which says comment the latter part out if you don't want online access to the manual.

If you compile Apache, either 1.3 or 2.0, the layout determines where everything will be. Apache2 usually installs to /usr/local/apache2/ and the config file is now in /usr/local/apache2/conf/ :

#
# This should be changed to the ServerRoot/manual/. The alias provides
# the manual, even if you choose to move your DocumentRoot. You may comment
# this out if you do not care for the documentation.
#
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/local/apache2/manual$1"

<Directory "/usr/local/apache2/manual">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all

<Files *.html>
SetHandler type-map
</Files>

SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
</Directory>

which you'll notice has a completely different tree structure and Directive [command line set of scripts] to place the manual. So, if you opt instead to install to someplace like /Apache2 instead of the default location, the directory will be:

AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/Apache2/manual$1"

<Directory "/Apache2/manual">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all

<Files *.html>
SetHandler type-map
</Files>

SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
</Directory>

httpd.conf has variations which are called by inet.d usually, somewhere around /etc/rc.d/ or the like. If the initial call is to httpd-std.conf or one of the other supplied config files, then the problem will be in that config file and not in httpd.conf

I personally don't like the use of shell environment variables, like $1 and $2, for referencing the environment's [distribution, architecture, et al] tree because they are too vague. It's a better practice to define the environment with local variables that test the environment. That is for program readability. However, that is another critique for Apache at another time. It's a leftover from the memory scarce 1960's that needs to be eliminated.

Notice that in the above Directives, the manual is placed directly under the ServerRoot for Apache's basic path and not under the www or htdocs secondary directory tree.

This was a good idea in making sure that Apache's links worked regardless of the installation. Other developers could learn from this. Apache will soon be where all documents are placed, for every program, and therefore I have proposed a structure of:

<Apache ServerRoot>/htdocs/docs/<programname>/

rather than the current developer structure of:

<distribtuion dependent path>/<programname>/docs/

because there is no need to duplicate the documents in the program tree, since they will eventually wind up in the httpd server's docs directory for convenience of use by web browsing, rather than by local file browsing.

Also, you cannot move the program docs from the program to the Web Server without failure of the links. Trees like :

<distribtuion dependent path>/docs/glibmm-2.4/docs/reference/html/

use redundant directory structures, and links, such as :

/glibmm-2.4/docs/reference/html/namespaceGlib.html

from gtkmm to glibmm break instantly when ported to the web server.

This is also a basic problem with W3 and html syntax; no rref and iref for relative reference and indirect relative reference.

The second structure,

<distribtuion dependent path>/<programname>/docs/

that of current developers, breaks links as shown by gtkmm and glibmm and is not portable to the Web Server. The developer's links are static, using "../../" to find the ServerRoot which is not where the related documents are or should be to begin with.

The first structure

<Apache ServerRoot>/htdocs/docs/<programname>/

proposed by me, is completely compliant and does not break links and is the most portable place to put documents, at least until W3 fixes their definiton of relative links; their definition itself is wrong. There is no real need for documents under the program's tree anymore because everyone is now expecting, and rightly so, that the documentation will be on a Web Server, and not on a local pc.

Last edited by GinEric; 02-27-2005 at 10:33 PM.
 
Old 03-11-2005, 08:49 AM   #13
SaiBTiger
LQ Newbie
 
Registered: Mar 2005
Posts: 1

Rep: Reputation: 0
I have the same trouble as dwig365.
After read this page, it is still a trouble--I am a Chinese, and I have learned little English.
Is there a God can tell me the method to solve the problem step by step by step?
Thanks!!!
 
Old 03-15-2005, 06:54 AM   #14
scotter
LQ Newbie
 
Registered: Jan 2005
Location: Midlands, UK
Posts: 6

Rep: Reputation: 0
Quote:
Originally posted by SaiBTiger
I have the same trouble as dwig365.
After read this page, it is still a trouble--I am a Chinese, and I have learned little English.
Is there a God can tell me the method to solve the problem step by step by step?
Thanks!!!
Look for manual.conf which is probably in /etc/httpd/conf.d/ and rename it to manual.conf.old and restart apache.

The problem appears to be because of manual.conf which now exists in /etc/httpd/conf.d/
The default httpd.conf includes *.conf files within this directory, however your httpd.conf Alias the /manual/ and so does manual.conf!
If manual.conf is not in /etc/httpd/conf.d/, do a 'updatedb' (as root) then 'locate manual.conf'
 
  


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
Apache2 #httpd -l won't work peterchin Linux - Software 1 02-24-2005 02:49 PM
httpd daemon needs frequent restart to work properly sushil_deore Linux - Software 0 09-16-2004 08:35 AM
FALCONS EYE (nethack) FAILS ON STARTUP, use to work, wont work even after reinstall roorings Linux - Software 0 10-08-2003 11:39 PM
starting httpd won't work OceanSurf Linux - Newbie 8 08-19-2003 01:08 PM
Will Httpd vhosts work with anothers DNS? paradoxlight Linux - General 1 02-02-2002 09:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:41 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration