Localhost 404 Error, need help, what in the world is wrong?


#1

I am trying to work on a site and all day it hasnt been working, that being localhost. I can go to localhost and XAMPP shows up, but if I try to go to localhost/htdocs or /localhost/htdocs/filename.php I get this 404 Error:

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

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

Error 404

localhost
05/25/06 15:57:12
Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.2

By the way, PHP, MySQL and APache status check says they are running, so I really don't get this.

This is extremely frustrating and I have got nothing done today. Need help >;(


#2

Did you try localhost/filename.php?


#3

XAMPP sets a default as Program Files/Xampp/Htdocs/xampp

YOU ARE ALREADY IN HTDOCS..

try doing ahref=../ in your directory...see if that works, if not..

try editing your xampp.conf file.

it is located in your xampp/apache folder
mine is (C:/Program Files/Xampp/Apache/conf/extra/xampp.conf)
(it might actually be xampp.htconf or something, but you'll see it..its the only one with the xampp)..

copy the PhpMyAdmin section, and paste it below.

change the /phpmyadmin to /htdocs or whatever you want to beshown after http://localhost.

Then you'll need to set up the doc root as well, this just tells apache where to serve the file from..

DONT SET UP as HTDOCS though because apache will go in a huge loop and consume all your CPU..i know i've tried.

anyway, i have a couple set up..

my document root is soemthing like:

c:/program files/xampp/htdocs/production/kreative

so you will see my main site,
but i have also set up
/phpmyadmin
/xampp
/development(which goes to c:/program files/xampp/htdocs/xampp/development).

Its nice if you add an .htacessfile to those directories you want to use
(like for me the phpmyadmin etc...don't want my visitors using those).

Hope this helps.


#4

Sorry that's a little messy...

apache\extra\httpd-xampp.conf is the xampp configuration file.

You can copy and paste to modify the entrys as you need. Don't forget to use the Xampp CP to restart apache.


#5

Did you understand?

in apache/conf/httpd.conf there is a line that says document root
what ever you set this document root to will be the main directory of localhost.
by default, xampp configures it to be /xampp/htdocs/xampp, (which is why your able to see the xampp pages at the localhost address. if you change to /xampp/htdocs, then you will be able to place documents in the htdocs folder and view them through localhost.

however, you can also add a folder to xampp/folder then view it at localhost/folder..
this may be easiest if you don't want to configure anything.

I use CVSNT to manage my pages, so i have set up a dev folder that is only visible to me, when i'm happy i commit the changes, then do cvs co to the production folder (which is also the document root)..

if you need more help, email me, and i can provide screen shots of how to do it.


#6

Thanks for the replys guys. I really don't know wtf I did, but it seems to be working now. I would have bet my life I tried just localhost by itself with the filename but it didnt work... it is now though. Strange.

Thats why I started trying to do localhost/htdocs, cause localhost/filename.php didnt work before. Anyways, its working now.... for whatever reason, so thank you for your quick replies. I appreciate it.


#7