Page 1 of 1

Error 403 Access forbidden! for Apache Virtual Host on Windo

PostPosted: 18. June 2011 21:49
by asksuperuser
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.

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

PostPosted: 19. June 2011 03:27
by JonB
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.

:!:

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

PostPosted: 19. June 2011 04:34
by Sharley
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.

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

PostPosted: 19. June 2011 19:49
by asksuperuser
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.

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

PostPosted: 19. June 2011 19:54
by asksuperuser
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.

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

PostPosted: 19. June 2011 21:45
by JonB
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)

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

PostPosted: 24. June 2011 07:50
by asksuperuser
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.

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

PostPosted: 24. June 2011 10:31
by JonB
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)