fc7/apache - cannot access directories only "directory/index.php"
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
fc7/apache - cannot access directories only "directory/index.php"
Hi,
I am have recently upgraded to FC7, and now, I cannot access any webpage inside my /var/www/html directories unless I specify the index file inside it.
For instance:
mydomain.com/mysite does not work, but if I do:
mydomain.com/mysite/index.php
I checked my /etc/http/conf file and it has a list of the expected index files under the directory index directive:
One other thing I noticed... If I try to access the pages from the server itself, I do not need to specify the index.php, the directory its is resolved. So it seems that affects only accessing the server from another machines both inside and outside my network.
I was having a similar problem. In the top level directory /var/www/ the index html and php filenames were required and it wouldn't display stylesheets, colors or images, but directories below it did.
My discovery was I needed to call /var/www using localhost. Using the address 127.0.0.1 for some reason acted as described before.
Hi David, these are two entries from the log, in the first instance I get the failure. On the second one I add index.php to the URL and it goes through.
iptables - or any other firewall - is NOT running on that machine.
Do you have virtual hosts setup in your httpd.conf file? From what you said about "127.0.0.1" not getting resolved to localhost, it sounds like something is broken.
What does your "Listen" line in "/etc/httpd/httpd.conf" say?
As for the 8080 port, my ISP blocks the port 80 so I use a no-ip port service to the port 8080. Remember, the only issue is that the server does not resolve the index file automatically when I specify the directory. If I specicy the index file in it, the forwarding and the site works perfectly.
Also, in the http.conf file for the Listen directive I have:
Thanks for all the help. After some time I was able to figure it out myself.
I had the directive UseCanonicalName set to On, and this was causing Apache to use the value of the Server name to create directives. By setting it to off did the trick.
I had the directive UseCanonicalName set to On, and this was causing Apache to use the value of the Server name to create directives. By setting it to off did the trick.
I guess that was why "127.0.0.1" was not getting resolved properly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.