Can't access htdocs

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

Can't access htdocs

Postby Steve542 » 11. April 2013 19:37

Hi,
I am having trouble getting things to work on my Win 7 64-bit system. (MS C++ installed). I've installed wampp 1.8 and Apache and MySQL are running,
The problem is, I get an object not found error whenever I access htdocs with my browser. Here are the settings in httpd.conf:

Listen 8080
ServerName localhost:8080
DocumentRoot "C:/xampp/htdocs"
<Directory />
AllowOverride none
Require all denied
</Directory>
AcceptFilter http none
<Directory "C:/xampp/htdocs">

I think that's it. I'm a complete newbie trying to learn php. Any
help anyone could give me would be very much appreciated. Thanks.

Steve
Steve542
 
Posts: 3
Joined: 11. April 2013 19:18
Operating System: Win 7 Home Premium

Re: Can't access htdocs

Postby hackattack142 » 12. April 2013 02:03

Hello,

Listen 8080

If you change the default port from 80, you have to specify that port in every URL (Ex: http://localhost:8080/myfile.php). All browsers make the assumption you are using port 80 if you do not specify it.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: Can't access htdocs

Postby Steve542 » 12. April 2013 03:25

Thanks for replying. I have been aiming my browser there without luck. http://localhost:8080/xampp/htdocs.
Any other ideas I can try?

Here's the apache error log from the last time I tried to access that directory.

[Thu Apr 11 07:10:07.477200 2013] [mpm_winnt:notice] [pid 1336:tid 460] AH00455: Apache/2.4.3 (Win32) PHP/5.4.7 configured -- resuming normal operations
[Thu Apr 11 07:10:07.492800 2013] [mpm_winnt:notice] [pid 1336:tid 460] AH00456: Server built: Aug 18 2012 12:41:37
[Thu Apr 11 07:10:07.492800 2013] [core:notice] [pid 1336:tid 460] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Apr 11 07:10:07.492800 2013] [mpm_winnt:notice] [pid 1336:tid 460] AH00418: Parent: Created child process 1292
[Thu Apr 11 07:10:08.428800 2013] [mpm_winnt:notice] [pid 1292:tid 368] AH00354: Child: Starting 150 worker threads.

Here is the access log:

127.0.0.1 - - [11/Apr/2013:21:28:03 -0500] "GET /xampp/htdocs HTTP/1.1" 404 1037 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"
Steve542
 
Posts: 3
Joined: 11. April 2013 19:18
Operating System: Win 7 Home Premium

Re: Can't access htdocs

Postby Altrea » 12. April 2013 03:43

Hi Steve,

Steve542 wrote:I have been aiming my browser there without luck. http://localhost:8080/xampp/htdocs.
Any other ideas I can try?

Apache already routes you to the \xampp\htdocs\ folder if you request http://localhost:8080/. \xampp\htdocs\ is the DocumentRoot folder, so it is also the root of the URL.
So if you request http://localhost:8080/xampp/htdocs/ Apache searches for files in \xampp\htdocs\xampp\htdocs\ which is not present.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Can't access htdocs

Postby Steve542 » 12. April 2013 05:48

Altrea,
I never thought seeing the words "Hello world" from my baby php script on my computer screen could make me so happy! Thank you! I can't tell you how grateful I am to get responses from yourself and hackattack142. Now on to my next ignorant mistake.

Steve
Steve542
 
Posts: 3
Joined: 11. April 2013 19:18
Operating System: Win 7 Home Premium

Re: Can't access htdocs

Postby Altrea » 12. April 2013 13:04

I'm happy you got it working :D
Have fun with XAMPP and all that crazy stuff 8)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 117 guests