logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: httpd.conf aliases throwing 404 errors
Author
Todd_Arndt



Joined: 01 Dec 2010
Posts: 3

PostPosted: Wed 01 Dec '10 19:29    Post subject: httpd.conf aliases throwing 404 errors Reply with quote

We built a new server with IBM HTTPServer 7.0.0.11. I updated the httpd.conf file with the Aliases list below. Every time we try to access a URL with the alias it always throws a 404 error. Even the OOTB icons alias is throwing a 404 error. We can't access the directory or any specific files. The exact same httpd.conf file, with a different ServerName value, is on a different server and that one is working. We checked the mod_alias (LoadModule alias_module modules/mod_alias.so) and it's pointing to the correct module and location. Being that none of the aliases are working, OOTB or custom, we believe there is a setting somewhere that is either turned off or pointing to the wrong location. During HTTP startup it's accessing the correct httpd.conf file so we are looking for other areas to check. Here is a section of the httpd.conf for our aliases.

Alias /WSsamples "D:\WebSphere\AppServer/WSsamples"
Alias /IBMWebAS/ "D:\WebSphere\AppServer/web/"
Alias /icons/ "D:/IBM/HTTPServer/icons/"

Additions for file mappings
Alias /uploads/ "D:/projects/f2m/appfiles/uploads/"
Alias /calcdata/ "D:/projects/f2m/appfiles/uploads/calcdata/"
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7306
Location: Germany, Next to Hamburg

PostPosted: Wed 01 Dec '10 22:12    Post subject: Reply with quote

You need to add a <directory> for each Alias so that aoache is allowe to access the path cause it is outside the document root.

e.g.
Code:

<Directory "D:/projects/f2m/appfiles/uploads/">
Option None
Order Allow,Deny
Allow from All
Deny fomr none
Back to top
Todd_Arndt



Joined: 01 Dec 2010
Posts: 3

PostPosted: Wed 01 Dec '10 22:26    Post subject: Reply with quote

I have the those. For some reason they got cut off when I submitted the post.

<Directory "D:/WebSphere/IBMHTTPServer20/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "D:/projects/f2m/uploads/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "D:/projects/f2m/uploads/calcdata/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 01 Dec '10 22:33    Post subject: Reply with quote

the icons one is kinda leaving me wondering but the others

Alias /uploads/ "D:/projects/f2m/appfiles/uploads/"
<Directory "D:/projects/f2m/uploads/">
do not match, this SHOULD be throwing a 403

same here, these do not match
Alias /calcdata/ "D:/projects/f2m/appfiles/uploads/calcdata/"
<Directory "D:/projects/f2m/uploads/calcdata/">

both Directory containers paths are missing "appdata," or appdata should not be in the Alias, one or the other.

nothing like checking the error log to see what it says, it can be subtle so fresh eyes work best.
Back to top
Todd_Arndt



Joined: 01 Dec 2010
Posts: 3

PostPosted: Wed 01 Dec '10 22:41    Post subject: Reply with quote

I saw that and added the appfiles to the path and the 404 error is still there. The access.log is only showing that the link has a 404 error and the error.log is not showing any errors. I shows during started that it's accessing the correct httpd.conf file. I have 3 other servers with the same aliases and they all work. Since the icons alias is not work that is leading us to believe that aliasing is turned off somewhere.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 02 Dec '10 20:21    Post subject: Reply with quote

nothing in the error log? Are you sure your browser is talking to the right server, or, you are looking in the right error if there is more than one (per vhost)? If there's a 404 there should be an error in the log.

[Thu Dec 02 04:49:34 2010] [error] [client 67.195.111.45] File does not exist: C:/home/mysite/public_html/robots.txt
Back to top


Reply to topic   Topic: httpd.conf aliases throwing 404 errors View previous topic :: View next topic
Post new topic   Forum Index -> Apache