Error 403 Access forbidden! for Apache Virtual Host on Windo

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

Error 403 Access forbidden! for Apache Virtual Host on Windo

Postby asksuperuser » 18. June 2011 21:49

Hello,

I have installed xampp I could access it successfully on port 85.

Then I created a virtual host and pointed to a custom dir (not under xampp)

<VirtualHost *:85>
ServerAdmin postmaster@dummy-host.localhost
DocumentRoot "C:/MyCustomDir/xampp"
ServerName mydomain.com
##ServerAlias www.dummy-host.localhost
##ErrorLog "logs/dummy-host.localhost-error.log"
##CustomLog "logs/dummy-host.localhost-access.log" combined
</VirtualHost>

When trying to access it from Internet I get:

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.

Error 403

Why ?

Thanks.
asksuperuser
 
Posts: 4
Joined: 29. June 2010 18:41

Re: Error 403 Access forbidden! for Apache Virtual Host on W

Postby JonB » 19. June 2011 03:27

When trying to access it from Internet I get:


Access it HOW?

either you do not mean what you said, or you have glossed over huge amounts of pertinent facts

among other things the XAMPP version and your Windows version.

:!:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Error 403 Access forbidden! for Apache Virtual Host on W

Postby Sharley » 19. June 2011 04:34

You're virtual host configuration is also wrong.

You are missing telling Apache if you are using a name based vhost.
You are missing the default localhost vhost settings.
You are missing the <Directory> directive to tell Apache where your DocumentRoot folder is located along with permissions that allow or deny access to it.
At the moment the server is using the default security settings and denying access to folders outside of the server's DocumentRoot folder - \xampp\htdocs.

Server errors like the 403 error should be investigated using the \xampp\apache\logs\error.log file which will give more accurate details about server errors.


Do a forum search for vhost or virtualhost as there are many recent working examples to compare with your offering.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Error 403 Access forbidden! for Apache Virtual Host on W

Postby asksuperuser » 19. June 2011 19:49

Hey I'm beginner that's the reason I took XAMPP otherwise I would have installed everything from scratch. I'm learning everything I have read the doc and virtual host and security settings are not thoroughly explained. And the search box is buggy at least on Google Chrome when I enter the mouse it keeps showing search I cannot type anything.
asksuperuser
 
Posts: 4
Joined: 29. June 2010 18:41

Re: Error 403 Access forbidden! for Apache Virtual Host on W

Postby asksuperuser » 19. June 2011 19:54

JonB wrote:
When trying to access it from Internet I get:


Access it HOW?


:!:


Xampp latest version of course since I just installed it. And Windows 2008 Server web edition with also IIS 7 installed in case it matters.

I access from internet by typing http://mydomain.com:myport what else do you want me to type since that's my very question: why I can't access through domain name and not just IP address.
asksuperuser
 
Posts: 4
Joined: 29. June 2010 18:41

Re: Error 403 Access forbidden! for Apache Virtual Host on W

Postby JonB » 19. June 2011 21:45

Xampp latest version of course since I just installed it. And Windows 2008 Server web edition with also IIS 7 installed in case it matters.
I access from internet by typing http://mydomain.com:myport what else do you want me to type since that's my very question: why I can't access through domain name and not just IP address.


Absolutely none of what you have just stated is apparent from your original post, nor could it be assumed. AND - of course IT ALL MATTERS -

I'm - err, I was - a volunteer trying to help you - probably with more knowledge and experience than you as well.

And - since you wish to be flippant:

I'll give you my response - "because you did it wrong".

Here's a very to-the-point 'Guide to asking questions' (originally pointed out to me by Altrea)
How To Ask Questions The Smart Way
http://www.catb.org/esr/faqs/smart-questions.html

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Error 403 Access forbidden! for Apache Virtual Host on W

Postby asksuperuser » 24. June 2011 07:50

JonB wrote:
Xampp latest version of course since I just installed it. And Windows 2008 Server web edition with also IIS 7 installed in case it matters.
I access from internet by typing http://mydomain.com:myport what else do you want me to type since that's my very question: why I can't access through domain name and not just IP address.


Absolutely none of what you have just stated is apparent from your original post, nor could it be assumed. AND - of course IT ALL MATTERS -


So when something is implicit you're not able to think about the most probable answer ? Since I just installed it probable I did download last version.

I'm - err, I was - a volunteer trying to help you - probably with more knowledge and experience than you as well.

And - since you wish to be flippant:

I'll give you my response - "because you did it wrong".

Here's a very to-the-point 'Guide to asking questions' (originally pointed out to me by Altrea)
How To Ask Questions The Smart Way
http://www.catb.org/esr/faqs/smart-questions.html

Good Luck
8)


It is since 1994 I'm on Internet so thank you I am accustomed to Forums and Newsgroup, happily many are much less arrogant than you are.

OK I will get rid off XAMPP and installed Apache & PHP by myself, I will less have problem with this blackbox and no real support.
asksuperuser
 
Posts: 4
Joined: 29. June 2010 18:41

Re: Error 403 Access forbidden! for Apache Virtual Host on W

Postby JonB » 24. June 2011 10:31

There is nothing implicit in this statement about when you might have originally installed XAMPP

I have installed xampp I could access it successfully on port 85.

Then I created a virtual host and pointed to a custom dir (not under xampp)


It could have been at any point in time that you decided to create a virtual host.

I stand by my statement that you could use reading that guide.

Be precise and informative about your problem

* Describe the symptoms of your problem or bug carefully and clearly.
* Describe the environment in which it occurs (machine, OS, application, whatever). Provide your vendor's distribution and release level (e.g.: “Fedora Core 7”, “Slackware 9.1”, etc.).
* Describe the research you did to try and understand the problem before you asked the question.
* Describe the diagnostic steps you took to try and pin down the problem yourself before you asked the question.
* Describe any possibly relevant recent changes in your computer or software configuration.
* If at all possible, provide a way to reproduce the problem in a controlled environment.

Do the best you can to anticipate the questions a hacker will ask, and answer them in advance in your request for help.

Giving hackers the ability to reproduce the problem in a controlled environment is especially important if you are reporting something you think is a bug in code. When you do this, your odds of getting a useful answer and the speed with which you are likely to get that answer both improve tremendously.


I sent you that PM, (means Private Message) so as to not be completely uncivil - but that is apparently not possible (you might read the section on 'dealing with rudeness, too) :mrgreen:

I wish you luck with your efforts, however you chose to go about them. As we all know, the Internet doesn't judge social skills or the effectiveness of certain tactics. :wink:

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 40 guests