Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 02-08-2006, 04:37 PM   #1
Registered: Jan 2006
Posts: 68

Rep: Reputation: 15
Apache Alias Returns 404 or "Cannot find server or DNS Error"

I have an alias set up in Apache like so:
Alias /folder/ "/usr/local/folder/"
<Directory "/usr/local/folder">
  AllowOverride None
  Order allow,deny
  Allow from all
Whenever I try to access
http ://server/folder or
https ://server/folder
I get a 404 (as expected).
Whenver I try to access
http ://server/folder/ or
https ://server/folder/
In FireFox on FC4 going to those URLs does nothing, but from IE on WinXP I get the typical "Cannot find server or DNS Error."
It should be noted that the code above is in an external conf file loaded by the Include directive and the documentroot is /war/www/html. I am running Apache 2 and PHP 5. It also may be relevant that I am trying to load index.php from the folder above, but index.php works fine on subfolders in the root... I am certain the answer is simple, but I have had no luck in finding it or manipulating permissions (chown to apache.apache or chmod to 777). Any help would be much appreciated.
Old 02-08-2006, 05:38 PM   #2
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
Alias /folder/ "/usr/local/folder/"
should be
Alias /folder "/usr/local/folder/"

I never used the include directive, but try if it's working if you add it to the virtualhost part of the apache config, which should work.
Old 02-08-2006, 10:37 PM   #3
Registered: Jan 2006
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks for the input. I had read in the default config file or a manual somewhere that it an alias would only work with the / after or only without it after and could not support both. I thought since I had files and subfloders in the aliased folder I needed the / after. After making this change, I can see that not having the / after allows it to work either way. However, the problem I was having and am still having is that when I try to go to this folder with FireFox nothing happens and when I try to go to it with IE I get the IE "Cannot find server or DNS Error" page. I can go to other folders and files on the webpage, so I know that the server can be found (and there is no DNS problem). Unfortunately, I don't see anything regarding the failure in any of the /var/log/httpd/ files. The httpd.conf is actually the default config file which uses the include statement to read config information from *.conf in /etc/httpd/conf.d/ along with itself (/etc/httpd/cof/httpd.conf). Based on everything I have read, I think this configuration may be unique to Red Hat. The conf.d folder includes an ssl.conf and a php.conf along with my folder.conf. It is obvious that all three are working as I can connect to the server via https and I can get phpinfo() output from a php page in a separate subfolder on the server. It may also be of interest that the folder I cannot get to work worked fine before Apache 2 (although that was on a different machine). Anything else? Even if it is monumentally stupid, suggest it, I have been digging and trying for days and it is driving me nuts.
Old 02-14-2006, 12:44 PM   #4
Registered: Jan 2006
Posts: 68

Original Poster
Rep: Reputation: 15

After rebooting the server, the logs started showing segmentation faults. It turns out php (yum rpm install) was crashing. I removed it and manually compiled the latest version. That resolved this issue.


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
Network boot returns "UDP Checksum Error" iainr Linux - Networking 1 08-06-2009 01:58 PM
Adding a directory returns "no medium found" error JcN Linux - Newbie 7 02-01-2006 08:40 PM
dns & apache server "need help installing" faustozabdi Linux - Software 1 01-03-2006 04:46 PM
bash equivalence of tcsh "alias em "emacs \!:1 &""? rgiggs Slackware 3 07-29-2004 02:07 AM
fdisk returns "unable to find /dev/hda" cfdisk crashes. cirofren Linux - Newbie 2 11-06-2003 12:03 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:36 PM.

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