Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24th July 2009, 02:53 AM
prodpedia Offline
Registered User
 
Join Date: Jul 2009
Posts: 8
Apache does not read files in /var/www/html. Selinux disabled

I successfully installed LAMP and Drupal. I was able to view the Drupal installation and testfile.html index.phpcreated within /var/www/html
Next I copied a tar from my home director (that was a copy of a Drupal website) to /var/www/html and untarred it.
That seemed to destroy everything. Not only can I not access the newly untarred file, I cannot access
index.php and any otehr file.
I learnt that selinux may be a problem so disabled it by changing /sbin/selinux/config and setting a line as disabled. Then I rebooted and ensured that selinux was disabled.
Yet I am unable to view the apache files. I have a brand new installation of F11 and have not changed httpd.conf

What should I do? My inability to make this work is hitting my project billing directly.
Reply With Quote
  #2  
Old 24th July 2009, 02:55 AM
prodpedia Offline
Registered User
 
Join Date: Jul 2009
Posts: 8
THis is the output from /var/www/html
drwxr-xr-x. root root unconfined_u:object_r:httpd_sys_content_t:s0 drupal
-rw-r--r--. root root unconfined_u:object_r:httpd_sys_content_t:s0 index.php
drwxr-xr-x root root ? junk
-rw-r--r-- root root ? testfile

I also tried restorecon * without success. However ,selinux is disabled
/usr/sbin/sestatus
SELinux status: disabled

so it should not be an issue
Reply With Quote
  #3  
Old 24th July 2009, 03:16 AM
tquang Offline
Registered User
 
Join Date: Jul 2009
Posts: 82
Check your httpd.conf
Reply With Quote
  #4  
Old 24th July 2009, 03:21 AM
prodpedia Offline
Registered User
 
Join Date: Jul 2009
Posts: 8
I also changed documentRoot in in httpd.conf to point to a newly created directory html-new in /var/www/
Same error 403 forbidden
Is there a way to cleanup and start all over again. I am up against a deadline and don't have time to lock horns with selinux
Reply With Quote
  #5  
Old 24th July 2009, 03:22 AM
prodpedia Offline
Registered User
 
Join Date: Jul 2009
Posts: 8
Thanks for the response. My httpd.conf never changed execpt now when I changed the document root. What should I check for
Reply With Quote
  #6  
Old 24th July 2009, 03:57 AM
neogranas Offline
Registered User
 
Join Date: Nov 2006
Location: U.S.A.
Age: 27
Posts: 473
What do your logs say (/var/log/httpd/error_log) when you visit that site?

You can open a terminal and as root (or sudo) type this:
Code:
tail -f /var/log/httpd/error_log
Hit enter a few times to give you some white space so it's easier to read, then hit the site in a web browser and go back to your logs and see what they say. That's the best way to find what is causing the issue.
__________________
Registered linux user: #475337

Never underestimate someone with source code, a text editor, and the willingness to completely hose their system.
Reply With Quote
  #7  
Old 24th July 2009, 06:18 AM
prodpedia Offline
Registered User
 
Join Date: Jul 2009
Posts: 8
For the files that within /var/www/html that were denied, this is the log

[Thu Jul 23 18:43:30 2009] [error] [client 127.0.0.1] (13)Permission denied: access to /index.php denied
[Thu Jul 23 18:56:25 2009] [error] [client 127.0.0.1] (13)Permission denied: access to /index.php denied
[Thu Jul 23 18:56:25 2009] [error] [client 127.0.0.1] (13)Permission denied: access to /index.html denied
[Thu Jul 23 18:56:25 2009] [error] [client 127.0.0.1] (13)Permission denied: access to /index.html.var denied
[Thu Jul 23 18:58:00 2009] [error] [client 127.0.0.1] (13)Permission denied: access to /index.php denied
[Thu Jul 23 18:58:00 2009] [error] [client 127.0.0.1] (13)Permission denied: access to /index.html denied
[Thu Jul 23 18:58:00 2009] [error] [client 127.0.0.1] (13)Permission denied: access to /index.html.var


For access to a new directory /var/www/html_new that was created as a root
the log is
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Thu Jul 23 19:20:19 2009] [notice] Digest: generating secret for digest authentication ...
[Thu Jul 23 19:20:19 2009] [notice] Digest: done
[Thu Jul 23 19:20:19 2009] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Thu Jul 23 19:20:19 2009] [notice] mod_python: using mutex_directory /tmp
[Thu Jul 23 19:20:19 2009] [notice] Apache/2.2.11 (Unix) DAV/2 PHP/5.2.9 mod_python/3.3.1 Python/2.6 mod_ssl/2.2.11 OpenSSL/0.9.8k-fips mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Thu Jul 23 19:20:21 2009] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html-new/
Reply With Quote
  #8  
Old 24th July 2009, 07:13 AM
tquang Offline
Registered User
 
Join Date: Jul 2009
Posts: 82
Below example about config you httpd.conf, this is mine

Code:
<VirtualHost 192.168.1.2:80>
        ServerName quangrc.co.cc
        ServerAlias *.quangrc.co.cc
        ServerAdmin admin@quangrc.co.cc
        DocumentRoot /var/www/quangrc.co.cc/
        ErrorLog /var/www/quangrc.co.cc/logs/error
        CustomLog /var/www/quangrc.co.cc/logs/custom common
                <Directory /var/www/quangrc.co.cc/>
                        DirectoryIndex index.php index.htm index.html
                        AllowOverride All
                        Allow from all
                        Order deny,allow
                        Options Indexes FollowSymLinks
                </Directory>
</VirtualHost>
Reply With Quote
  #9  
Old 24th July 2009, 07:13 AM
tquang Offline
Registered User
 
Join Date: Jul 2009
Posts: 82
Below example about config you httpd.conf, this is mine

Code:
<VirtualHost 192.168.1.2:80>
        ServerName quangrc.co.cc
        ServerAlias *.quangrc.co.cc
        ServerAdmin admin@quangrc.co.cc
        DocumentRoot /var/www/quangrc.co.cc/
        ErrorLog /var/www/quangrc.co.cc/logs/error
        CustomLog /var/www/quangrc.co.cc/logs/custom common
                <Directory /var/www/quangrc.co.cc/>
                        DirectoryIndex index.php index.htm index.html
                        AllowOverride All
                        Allow from all
                        Order deny,allow
                        Options Indexes FollowSymLinks
                </Directory>
</VirtualHost>
Reply With Quote
  #10  
Old 24th July 2009, 07:31 AM
neogranas Offline
Registered User
 
Join Date: Nov 2006
Location: U.S.A.
Age: 27
Posts: 473
Directory Index Forbidden means that it got the directory, but didn't find a file listed as one that is looked for as an index file. Try putting an html page or PHP page there named index.(html or php) and see if that works. Seeing as permission is denied to the others, check the folder permissions on html in /var/www

I personally set mine to be a public_html folder in my user's home, which makes it much easier for me to keep track of things and not have files that are accessible by apache as root owned.
__________________
Registered linux user: #475337

Never underestimate someone with source code, a text editor, and the willingness to completely hose their system.
Reply With Quote
Reply

Tags
apache, disabled, files, or var or www or html, read, selinux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


Current GMT-time: 08:46 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat