[SOLVED] Virtual Host 403 Access forbidden

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

[SOLVED] Virtual Host 403 Access forbidden

Postby Ms_Sutani » 18. May 2009 12:37

Hi,

I'm trying out lampp for the first time, and it seems really nice, but I can't get virtual hosts working for this project I'm working on.
I am running the project outside of /opt/lampp/htdocs. It's in my /home/mssutani/projects directory.

Every time I try and go to my virtualhost I get a 403 error: Access forbidden.

I have edited my httpd-vhosts.conf file and I have allowed Virtual hosts in httpd.conf.

I even tried chmoding all my files and directory 777 but I still get Access forbidden.

I did some searching on this messageboard and found people with similar issues but no solutions.
Last edited by Ms_Sutani on 18. May 2009 18:25, edited 1 time in total.
User avatar
Ms_Sutani
 
Posts: 7
Joined: 18. May 2009 12:24

Re: Virtual Host 403 Access forbidden

Postby Wiedmann » 18. May 2009 13:00

Every time I try and go to my virtualhost I get a 403 error: Access forbidden.

1st.: read the error.log what's the reason for an "access forbidden".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Virtual Host 403 Access forbidden

Postby Ms_Sutani » 18. May 2009 14:49

The reason is:

[error] [client 127.0.0.1] (13)Permission denied: access to / denied

I just noticed that as soon as I enabled virtual hosts I can nolonger get into the xampp pages from http://localhost
User avatar
Ms_Sutani
 
Posts: 7
Joined: 18. May 2009 12:24

Re: Virtual Host 403 Access forbidden

Postby Wiedmann » 18. May 2009 14:57

It's in my /home/mssutani/projects directory.
Code: Select all
[error] [client 127.0.0.1] (13)Permission denied: access to / denied

Your Apache user must have at least read access to:
/
/home/
/home/mssutani/
/home/mssutani/projects/
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Virtual Host 403 Access forbidden

Postby Ms_Sutani » 18. May 2009 15:17

Hmmm, I'm not sure who my apache user is. How do I find out? Generally when I'm using ubuntu it's www-data, but I'm stuck in a different distro right now and I don't know who the user is.

Also, why can't I get to the xampp pages as soon as I start virtual hosts?
Now if I go to http://localhost/xampp I get the same 403 error. It works when I turn comment out virtual hosts in the httpd.conf file.

Thanks for your help so far!
User avatar
Ms_Sutani
 
Posts: 7
Joined: 18. May 2009 12:24

Re: Virtual Host 403 Access forbidden

Postby Wiedmann » 18. May 2009 15:25

I'm not sure who my apache user is.

The Apache user (group) is defined in "httpd.conf".

Also, why can't I get to the xampp pages as soon as I start virtual hosts?

Maybe there is no vhost for the old DocumentRoot?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Virtual Host 403 Access forbidden

Postby Ms_Sutani » 18. May 2009 15:41

Maybe there is no vhost for the old DocumentRoot?


Ah, So enabling virtual host disables the default /htdocs/project from being hosted as http://localhost/project?

I think this may have done the trick! I just changed the user and group to my own user and group. I still ahve to set everything up to verify it worked properly...
and also right now I made everything read-write-executable because i was trying to figure out what was going wrong. I'll need to set the correct permissions... but so far so good!

Thank you!
User avatar
Ms_Sutani
 
Posts: 7
Joined: 18. May 2009 12:24

Re: Virtual Host 403 Access forbidden

Postby Wiedmann » 18. May 2009 15:53

Ah, So enabling virtual host disables the default /htdocs/project from being hosted as http://localhost/project?

Let me say yes. (of course, this depends on, how you define your vhosts.)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

[SOLVED] Re: Virtual Host 403 Access forbidden

Postby Ms_Sutani » 18. May 2009 16:37

I just wanted to confirm that specifying the user and group in http.conf did work for me.

I don't see a way to mark this thread as solved so, I'm trying to make it very clear incase other people run into this problem.

Thanks!
User avatar
Ms_Sutani
 
Posts: 7
Joined: 18. May 2009 12:24

Re: [SOLVED] Virtual Host 403 Access forbidden

Postby rvrijbroek » 08. May 2010 11:59

This worked for me with windows 7 and version 1.7.3
in httpd.conf i've added the # in the directory to have it work with vhosts.
My vhosts were located outside of the root folder...

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
# Options FollowSymLinks
# AllowOverride None
# Order deny,allow
# Deny from all
</Directory>
rvrijbroek
 
Posts: 1
Joined: 08. May 2010 11:56


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 27 guests