Apache won't read html files

kasproso

New member
Joined
Nov 17, 2016
Messages
3
Hello,

Mostly I find answers on this forum, but this time I couldn't find anything.

I have a strange situation. On my directadmin installation, apache won't read html files. Thats strange becouse when I go to:
http://domain.com/index.html
I have a 404 error

Code:
The requested URL /index.php was not found on this server.
The strange thing is that apache is trying to open index.php and ignoring my request.

the error log

Code:
[Thu Nov 17 11:21:34 2016] [error] [client 185.129.32.134] script '/home/admin/domains/la666.pl/public_html/projekt6/index.php' not found or unable to stat
[Thu Nov 17 11:21:34 2016] [error] [client 185.129.32.134] script '/home/admin/domains/la666.pl/public_html/projekt6/index.php' not found or unable to stat
[Thu Nov 17 11:21:34 2016] [error] [client 185.129.32.134] script '/home/admin/domains/la666.pl/public_html/projekt6/index.php' not found or unable to stat
[Thu Nov 17 11:21:35 2016] [error] [client 185.129.32.134] script '/home/admin/domains/la666.pl/public_html/projekt6/index.php' not found or unable to stat
[Thu Nov 17 11:21:35 2016] [error] [client 185.129.32.134] script '/home/admin/domains/la666.pl/public_html/projekt6/index.php' not found or unable to stat
[Thu Nov 17 11:21:45 2016] [error] [client 185.129.32.134] script '/home/admin/domains/la666.pl/public_html/projekt6/index.php' not found or unable to stat
[Thu Nov 17 11:21:45 2016] [error] [client 185.129.32.134] script '/home/admin/domains/la666.pl/public_html/projekt6/index.php' not found or unable to stat

On the main httpd.conf there is:

Code:
<IfModule dir_module>
    DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>

I even add DirectoryIndex to the vhost's and still nothing :(

Any advise?
 
Are you sure you've not a .htaccess file there that rewrite everything (or just .html) to .php?

Also, provide a real domain name would help us to dig better.

Best regards
 
Put a simple (only text) index.html file in the public or private directory. ( so no php or other code scripts in it!)
Rename the .htaccess file for the test to somewhat else, ( so not using a htaccess at all)

Is the easiest way to test, then if OK rename the htaccess back and use it, then take care of the lines that are causing this in the htaccess. (As Andrea writes up here, further apache version update in compatible problems with some settings in htaccess and so on are possible also)

So that domain have had a older apache version before, and is that updated from 2.2. to 2.4? other version changes / updates.


Ofcourse use browser refresh after changes / try other browser also if this didn't work just to be(99,99%) sure. ;)

Above i name the private directory, thats if settings for that domain are made to have https or were before https only take care of that also! ( but error doesn't point to such thing only to be sure though)
 
Last edited:
Back
Top