Keep getting "Error 403 Forbidden" in gutsy

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Keep getting "Error 403 Forbidden" in gutsy

Postby enchance » 14. November 2007 16:10

I just installed LAMPP and copied my folder to htdocs. But whenever I run
Code: Select all
http://localhost/mysite

I get the "403 Forbidden" page which says the ff:
Code: Select all
You don't have permission to access /johnimbong on this server.

What should I do?
enchance
 
Posts: 3
Joined: 10. November 2007 18:46

Postby Scory » 14. November 2007 23:16

It's extremely strange that you enter "http://localhost/mysite" but get a message that folder /johnimbog is not accessible!!

What are you doing there?
Scory
 

Postby enchance » 15. November 2007 05:57

Oh, sorry. I mistyped it. I type in
Code: Select all
http://localhost/johnimbong

and get (in the html page)
Code: Select all
You don't have permission to access /johnimbong on this server.


MY SITUATION (wasn't mentioned in my last post):
I copied all my .php files from my WinXP desktop and into my gutsy laptop and I'm using DreamWeaver8 in WINE to edit them. I set my testing server to /opt/lampp/htdocs/johnimbong but everytime I run the line above I get the "403 Forbidden" page.

What I've done (but still failed) so far:
1. FAILED: Since it's a permissions thing, I changed the index.php permissions to "Access files" instead of just "None" and it kind of worked but that's not the best solution since there are too many files to change 1 by 1.
2. FAILED: Installed LAMPP on '/home/<username>" instead of "/opt" which was really stupid even after renaming all errors to "/home/<username>" (which still did not work)

NEXT OPTION:
1. Since I'm in WINE, should I install XAMPP for Windows? I'll probably hold this off since why install Windows on a Linux box?

Need help...I don't want to have to dual-boot just so I can run my .php files. Pretty please?? :?
enchance
 
Posts: 3
Joined: 10. November 2007 18:46

Postby Wokm4n » 04. February 2008 11:01

I got exactly the same problem and I tried just about everything to make it work..

Someone has found a solution to all this 403 Forbidden errors? =/
Wokm4n
 
Posts: 3
Joined: 04. February 2008 11:00

Postby Scory » 04. February 2008 13:29

The reason is always a missing <directory ...> Block for the appropriate folder. Look into you httpd.conf and copy the <directory ...> Block of the htdocs-Folder (DocumentRoot) and change the folder-name to the name you need.

Restart Apache.

>Someone has found a solution to all this 403 Forbidden errors? =/

Yes, fortunately there are people outside there which read documentation. As me, for example.
Scory
 

Postby Wokm4n » 05. February 2008 13:57

I checked the online documentation...

I appreciate your help but I don't really understand what you're pointing at with
"a missing <directory ...> Block"
Wokm4n
 
Posts: 3
Joined: 04. February 2008 11:00

Postby Scory » 05. February 2008 15:15

Did you (ever) edit httpd.conf?
Haven't you (ever) seen something like this:

Code: Select all
<Directory "c:/programme/xampp/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks Includes ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>


How would YOU call that block?
Did you (ever) copy a block like that above and adapt it for your needs (i.e. for the folders you need)?
That's exactly what you MUST DO.
Scory
 

Postby Wokm4n » 11. February 2008 13:08

A that kind of block.

OK I copied it and edited it to /opt/lampp/htdocs/user

the folder 'user' links to '/home/user/localhost' where I place my files.

On /localhost/user I get the index of the files, allright perfect. However when I navigate to a subfolder, this is what I get:
Warning: Unknown: failed to open stream: Toegang geweigerd in Unknown on line 0

Warning: Unknown: Failed opening '/opt/lampp/htdocs/user/subfolder/index.php' for inclusion (include_path='.:/opt/lampp/lib/php') in Unknown on line 0


This is what I get for every subfolder =s

edit: File permissions were the problem. I changed the permissions of htdocs and htdocs/user before but I had to chmod the index.php files to 777.

Code: Select all
cd /opt/lampp/htdocs/subfolder
sudo chmod 777 index.php

Does the job :)

kinda annoying I have to manually chmod every file I want to read (images and index.php/html's, includes work fine), chmod the folder won't work =/
thanks.
Wokm4n
 
Posts: 3
Joined: 04. February 2008 11:00


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 3 guests