LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 02-08-2006, 05:37 PM   #1
The00Dustin
Member
 
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:
Code:
Alias /folder/ "/usr/local/folder/"
<Directory "/usr/local/folder">
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>
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, 06:38 PM   #2
Moloko
Member
 
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, 11:37 PM   #3
The00Dustin
Member
 
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, 01:44 PM   #4
The00Dustin
Member
 
Registered: Jan 2006
Posts: 68

Original Poster
Rep: Reputation: 15
Update

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.
 
  


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


All times are GMT -5. The time now is 02:40 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