Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th August 2010, 05:49 PM
gastonv Offline
Registered User
 
Join Date: Nov 2006
Posts: 155
linuxfedorafirefox
httpd: You don't have permission to access / on this server.

Hello,
I work with FC13 and Firefox.
In FC12 I could work successfully with PHP and MySQL for own applications on my PC.

All of my programs where installed in
Code:
[gastonv@gastonv ~]$ ls public_html/*.php
public_html/helloworld.php  public_html/overzichttest.php
public_html/index.php       public_html/test_connect.php
public_html/nieuws.php      public_html/test.php
Code:
[gastonv@gastonv ~]$ id
uid=500(gastonv) gid=500(gastonv) groups=500(gastonv)
On this moment in my httpd.conf I have:
Code:
### Section 2: 'Main' server configuration
...
# DocumentRoot: The directory out of which you will serve your
# documents
# DocumentRoot "/var/www/html"
DocumentRoot "/home/gastonv/public_html"
...
# This should be changed to whatever you set DocumentRoot to.
#
#  <Directory "/var/www/html">
<Directory "/home/gastonv/public_html">
...
<IfModule mod_userdir.c>
#   UserDir disabled
    UserDir enable gastonv
UserDir public_html
</IfModule>
...
# <Directory /home/*/public_html>
<Directory /home/gastonv/public_html>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>
With DocumentRoot to following directory, the following html an php programs are running in Firefox
Code:
[gastonv@gastonv ~]$ ls /var/www/html
helloworld.html  index.html  nieuws.php         test_connect.php
helloworld.php   index.php   overzichttest.php  test.php
Code:
http://localhost > shows PHP Version 5.3.2 info screen
http://localhost/index.html
http://localhost/helloworld.php
With DocumentRoot to ~/public_html I received the following Error:
Code:
Forbidden
You don't have permission to access /~gastonv/ on this server.
Code:
[gastonv@gastonv ~]$ sudo /etc/init.d/httpd restart 
Stoppen van httpd:                                         [  OK  ]
Starten van httpd: httpd: Could not reliably determine the server's fully qualified domain name, using ::1 for ServerName        [  OK  ]
Code:
[gastonv@gastonv ~]$ cat /etc/hosts
127.0.0.1	gastonv	localhost.localdomain	localhost
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
Code:
[gastonv@gastonv ~]$ hostname
localhost
Code:
[gastonv@gastonv ~]$ yum list installed | grep php
php.i686                              5.3.2-2.fc13               @updates       
php-cli.i686                          5.3.2-2.fc13               @updates       
php-common.i686                       5.3.2-2.fc13               @updates
Code:
[gastonv@gastonv ~]$ ls -l public_html/*.*
-rw-rw-r--. 1 gastonv gastonv 1054 jun 22  2008 public_html/functions.inc
-rwxr-xr-x. 1 gastonv gastonv  110 dec 30  2007 public_html/helloworld.html
-rwxr-xr-x. 1 gastonv gastonv  123 dec 29  2007 public_html/helloworld.php
-rwxrwxrwx  1 root    root      13 aug 12 14:02 public_html/index.html
-rwxrwxrwx  1 root    root      29 aug 12 14:02 public_html/index.php
-rwxrwxr-x. 1 gastonv gastonv 1271 jan 23  2008 public_html/nieuws.php
-rwxrwxr-x. 1 gastonv gastonv  517 jan 23  2008 public_html/overzichttest.php
-rwxrwxr-x. 1 gastonv gastonv  258 jan 23  2008 public_html/test_connect.php
-rwxr-xr-x. 1 gastonv gastonv  235 jan 16  2008 public_html/test.php
[gastonv@gastonv ~]$ ls -l public_html/*.php
-rwxr-xr-x. 1 gastonv gastonv  123 dec 29  2007 public_html/helloworld.php
-rwxrwxrwx  1 root    root      29 aug 12 14:02 public_html/index.php
-rwxrwxr-x. 1 gastonv gastonv 1271 jan 23  2008 public_html/nieuws.php
-rwxrwxr-x. 1 gastonv gastonv  517 jan 23  2008 public_html/overzichttest.php
-rwxrwxr-x. 1 gastonv gastonv  258 jan 23  2008 public_html/test_connect.php
-rwxr-xr-x. 1 gastonv gastonv  235 jan 16  2008 public_html/test.php
[gastonv@gastonv ~]$ ls -lZd /var/www/html
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 /var/www/html
[gastonv@gastonv ~]$ ls -lZd public_html
drwxr-xr-x. gastonv gastonv unconfined_u:object_r:httpd_user_content_t:s0 public_html
It have something to set right with permissions, but I don't know how to do it.
I have read and tried many tests, but without success.
Many thanks in advance for helping,
Greetings,
Gaston Verhulst.
Reply With Quote
  #2  
Old 12th August 2010, 07:27 PM
assen Offline
Registered User
 
Join Date: Oct 2008
Posts: 492
linuxfedorafirefox
Re: httpd: You don't have permission to access / on this server.

Hi

Check that /home/gastonv/ is world-readable and world-executable (755) - otherwise httpd will not be able to stat() it and will give an error like the one you see. Often by default the home directory is 700.

WWell,
Reply With Quote
  #3  
Old 12th August 2010, 07:46 PM
gastonv Offline
Registered User
 
Join Date: Nov 2006
Posts: 155
linuxfedorafirefox
Re: httpd: You don't have permission to access / on this server.

Hello dear,
Yes, that was it!
I did not check that.
Many thanks for that solution.
I have to thank very much you for your help.
Many greetings,
Gaston Verhulst.
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
SVN Server Access Permission??? ajeetraina Servers & Networking 1 27th March 2008 07:44 AM


Current GMT-time: 23:37 (Tuesday, 22-07-2014)

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