Page 1 of 1

Can't access htdocs

PostPosted: 11. April 2013 19:37
by Steve542
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

Re: Can't access htdocs

PostPosted: 12. April 2013 02:03
by hackattack142
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.

Re: Can't access htdocs

PostPosted: 12. April 2013 03:25
by Steve542
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"

Re: Can't access htdocs

PostPosted: 12. April 2013 03:43
by Altrea
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

Re: Can't access htdocs

PostPosted: 12. April 2013 05:48
by Steve542
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

Re: Can't access htdocs

PostPosted: 12. April 2013 13:04
by Altrea
I'm happy you got it working :D
Have fun with XAMPP and all that crazy stuff 8)