LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache Alias Returns 404 or "Cannot find server or DNS Error" (https://www.linuxquestions.org/questions/linux-software-2/apache-alias-returns-404-or-cannot-find-server-or-dns-error-413158/)

The00Dustin 02-08-2006 04:37 PM

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.

Moloko 02-08-2006 05:38 PM

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.

The00Dustin 02-08-2006 10:37 PM

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.

The00Dustin 02-14-2006 12:44 PM

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.


All times are GMT -5. The time now is 05:37 PM.