logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



apache 2.4 failing to read files in /var/www/html

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
erasmas



Joined: 11 Oct 2017
Posts: 3
Location: Australia, Perth

PostPosted: Fri 13 Oct '17 17:26    Post subject: apache 2.4 failing to read files in /var/www/html Reply with quote

OS : Fedora 25
apache v 2.4
log file : see at the end

I note that the Lounge is for windows whereas that is a product that I haven't used since the early 90s.

I have used apache on numerous sites running linix as the main server environment but I haven't played with apache for some time. I have also encountered an interesting problem.

In the absence of an index.html file the default page (from apache) is displayed. Notwithstanding my able to read /var/www/html/index.html (using cat or more or whatever)
the server informed me that I don't have permissions when I type localhost in the URL space. Permissions on the files and directories are set correctly.

I had a bit of a play with SELinux and subsequently was able to view the directory; the html was NOT being rendered but directories referenced in the file were visible. However,
clicking on any particular directory resulted in the same error message as previously.

As an aside 2.4 did NOT run "out of the box" on a newish Mac Airbook either. However, with a fair bit of tweeking I got apache to work.

I can't see where the settings have disappeared to : I mean the number of servers, child processes etc. that could be stipulated in httpd.conf As i say it has been some time
since I have played with apache and a good deal seems to have
changed.

output of log file :


[Fri Oct 13 23:21:44.969560 2017] [autoindex:error] [pid 24287] [client ::1:35618] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Fri Oct 13 23:21:44.983583 2017] [core:error] [pid 24287] (13)Permission denied: [client ::1:35618] AH00132: file permissions deny server access: /var/www/html/css/style.css, referer: http://localhost/
[Fri Oct 13 23:21:44.983810 2017] [core:error] [pid 24183] (13)Permission denied: [client ::1:35622] AH00132: file permissions deny server access: /var/www/html/js/jquery.ba-hashchange.min.js, referer: http://localhost/
[Fri Oct 13 23:21:44.984075 2017] [core:error] [pid 28787] (13)Permission denied: [client ::1:35620] AH00132: file permissions deny server access: /var/www/html/js/ajax.js, referer: http://localhost/
[Fri Oct 13 23:21:44.984430 2017] [core:error] [pid 24204] (13)Permission denied: [client ::1:35624] AH00132: file permissions deny server access: /var/www/html/js/main.js, referer: http://localhost/
[Fri Oct 13 23:21:44.998385 2017] [core:error] [pid 28787] (13)Permission denied: [client ::1:35620] AH00132: file permissions deny server access: /var/www/html/airplane-309503_1280.png, referer: http://localhost/
[Fri Oct 13 23:21:45.000887 2017] [core:error] [pid 28787] (13)Permission denied: [client ::1:35620] AH00132: file permissions deny server access: /var/www/html/js/jquery.ba-hashchange.min.js, referer: http://localhost/
[Fri Oct 13 23:21:45.004066 2017] [core:error] [pid 28787] (13)Permission denied: [client ::1:35620] AH00132: file permissions deny server access: /var/www/html/js/main.js, referer: http://localhost/

[Fri Oct 13 23:22:03.991325 2017] [core:error] [pid 24220] (13)Permission denied: [client ::1:35630] AH00132: file permissions deny server access: /var/www/html/PPL/test.html, referer: http://localhost/

permissions on files are set 644 apache:user were user = me; apache:apache or root:root has the same effect


Kind regards,
Back to top
pschmehl



Joined: 13 Oct 2017
Posts: 7
Location: United States, Richardson, TX

PostPosted: Sat 14 Oct '17 1:20    Post subject: Reply with quote

What's in your .htaccess file? What sort of denies do you have in your httpd.conf file?
Back to top
erasmas



Joined: 11 Oct 2017
Posts: 3
Location: Australia, Perth

PostPosted: Sat 14 Oct '17 3:37    Post subject: Reply with quote

pschmehl wrote:
What's in your .htaccess file? What sort of denies do you have in your httpd.conf file?


Thanks for your reply but

(1) I do not have a .htaccess file because I am not treating other directories as special or with differing properties nor am I implementing virtual hosts.

(2) the allow deny directives, while utilised in v2.2, are depreciated in 2.4

(3) as an aside an .htaccess file is unnecessary if one has administration over the (apache) server; viz., is able to (directly) edit /etc/httpd/httpd.conf

As conveyed, I configured apache 2.4 on a Mac. After a lot of messing about the site runs and there is no .htaccess file anywhere.
Back to top
erasmas



Joined: 11 Oct 2017
Posts: 3
Location: Australia, Perth

PostPosted: Sat 14 Oct '17 4:43    Post subject: Reply with quote

bog standard httpd.conf file

DocumentRoot "/var/www/html"
#
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
#
# Further relax access to the default document root:
<Directory "/var/www/html">
#
Options Indexes FollowSymLinks

RewriteBase /html
# RewriteBase seems to have no effect
AllowOverride All
Require all granted
#
</Directory>
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1