PDA

View Full Version : [SOLVED] Apache2 403 Forbidden error



adrenalin6
October 15th, 2009, 08:46 PM
Hello, im new to this forum and Im new to ubuntu, recently I been trying to make a server with apache and when ever I try to access it it gives me this.


Forbidden

You don't have permission to access /index.html on this server.
Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server at localhost Port 80

I tried everything, there is nothing in the error log. Any help would be greatly appreciated.

By the way, I got ubuntu 9.04

- Henry

zkriesse
October 15th, 2009, 08:54 PM
Take a look at this...it's a page I wrote for this very thing as you pretty much won't find anything elsewhere. Keep in mind it's not yet finished but it should help you out if not just a little. Send me a message or an email from here and let me know the results.

adrenalin6
October 15th, 2009, 08:57 PM
Take a look at this...it's a page I wrote for this very thing as you pretty much won't find anything elsewhere. Keep in mind it's not yet finished but it should help you out if not just a little. Send me a message or an email from here and let me know the results.
Where can I find this?

sandyd
October 15th, 2009, 09:00 PM
Hello, im new to this forum and Im new to ubuntu, recently I been trying to make a server with apache and when ever I try to access it it gives me this.


Forbidden

You don't have permission to access /index.html on this server.
Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server at localhost Port 80

I tried everything, there is nothing in the error log. Any help would be greatly appreciated.

By the way, I got ubuntu 9.04

- Henry
did you set the .htaccess and the folder permissions correctly.
and is there an index.html in the server directory (by default, /var/www)

adrenalin6
October 15th, 2009, 09:04 PM
did you set the .htaccess and the folder permissions correctly.
and is there an index.html in the server directory (by default, /var/www)

I did not set the .htaccess file, and yes there is a index.html file if your read the code I posted. mine is not /var/www, its /home/(username)/www.

Where can I find this .htaccess?

diesch
October 15th, 2009, 09:07 PM
What are the permissions for /home/username and /home/username/www?

zkriesse
October 15th, 2009, 09:23 PM
Where can I find this?
Sorry 'bout that, here's the link. https://help.ubuntu.com/community/UbuntuWithFirebirdDatabase

sandyd
October 15th, 2009, 09:36 PM
can you do


sudo chown username ~/www
sudo chmod 777 ~/wwwif that works, its a folder permission issue.

and can you do


cat /etc/apache2/apache2.conf


and


dir /etc/apache2/sites-enabled/
cat /etc/apache2/sites-enabled/*

diesch
October 15th, 2009, 09:45 PM
Making the folder writeable isn't needed, ~/ and ~/www just have to be executable for either www-data or all users.

adrenalin6
October 15th, 2009, 10:45 PM
can you do


sudo chown username ~/www
sudo chmod 777 ~/wwwif that works, its a folder permission issue.

and can you do


cat /etc/apache2/apache2.conf
and


dir /etc/apache2/sites-enabled/
cat /etc/apache2/sites-enabled/*


Already did that, didnt work

adrenalin6
October 15th, 2009, 10:46 PM
What are the permissions for /home/username and /home/username/www?

How do you check permissions?

diesch
October 15th, 2009, 11:04 PM
ls -ld /home/username /home/username/www

adrenalin6
October 16th, 2009, 12:13 AM
ls -ld /home/username /home/username/www
For first I got

drwxr-xr-x 45 adrenalin6 adrenalin6 4096 2009-10-15 15:24 /home/adrenalin6

and for second I get

drwxrwxrwx 4 adrenalin6 adrenalin6 4096 2009-10-15 15:17 /home/adrenalin6/www

adrenalin6
October 17th, 2009, 04:35 AM
K, I figured everything out

ponchorage
November 6th, 2009, 06:01 PM
How did you fix it? I'm having the same problem.

phunkizm
January 22nd, 2010, 07:51 PM
K, I figured everything out

:-x

It would be nice if you could tell us what you have figured out. It is very frustrating to read through a thread to the end, only to find that it has been solved without an explanation.

mechanizedmedic
February 2nd, 2010, 12:27 PM
:-x

It would be nice if you could tell us what you have figured out. It is very frustrating to read through a thread to the end, only to find that it has been solved without an explanation.

i had the same issues with this and it ended up being the permissions. i found that the following info was what i needed to fix the problem.

sudo chmod -R 755 /home/username/www

http://ubuntuforums.org/showpost.php?p=1590980&postcount=2

...why am i having to format my post with html?