Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: getting to localhost/mysite 'object not found' |
|
Author |
|
seph
Joined: 29 Aug 2009 Posts: 3
|
Posted: Sat 29 Aug '09 18:43 Post subject: getting to localhost/mysite 'object not found' |
|
|
Hi, I've spent close to two hours looking for an answer to this, I know it's there somewhere but search engines suck helping to find answers to the important things.
I have just installed apache friends edition xampp on vista. I have had experience with this from back at uni. PHP and mysql are apparently working, but my issue is getting to my site. i'm trying to get to index.php in C:/xampp2/xampp/htdocs/test/
From memory you should be able to get to the site by going to localhost/test,where test is the name of the folder inside htdocs
However I get an 'object not found' error. I have tried various combinations of additions to hosts, httpd.conf, and httpd-vhosts.conf. I restarted Apache after every edit, and to no avail.
an example of what i have added to httpd.conf is
Code: | NameVirtualHost *:80
<VirtualHost *:80>
ServerName test
DocumentRoot C:/xampp2/xampp/htdocs/test
</VirtualHost> |
Any help with this will be appreciated. It can't be that hard, the IDE I used to use (Eclipse) did this all for me but I don't have access to it anymore.
Cheers |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sat 29 Aug '09 20:02 Post subject: |
|
|
Well .. if ServerName == test
then http://test is what you want. However, the always overlooked thing in vhosts is the _default_ one which is just a bare minimum of the main server config in httpd.conf and must come first or problems develop.
assuming that is set at C:/xampp2/xampp/htdocs then first vhost
<VirtualHost _default_:*>
DocumentRoot C:/xampp2/xampp/htdocs
</VirtualHost>
then
<VirtualHost *:80>
ServerName test
DocumentRoot C:/xampp2/xampp/htdocs/test
</VirtualHost>
Of course "test" must be defined in your hosts file on Windows and pointed to 127.0.0.1.
Backtracking however, what is the main config in httpd.conf
Please just the ServerName & DocumentRoot and the <Directory c:\???> container for that document root .. minus all the comment lines. |
|
Back to top |
|
seph
Joined: 29 Aug 2009 Posts: 3
|
Posted: Sun 30 Aug '09 3:36 Post subject: |
|
|
Hiya, thanks for taking an interest.
Here is my httpd.conf file
Code: |
ServerName localhost:80
DocumentRoot "C:/xampp2/xampp/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "C:/xampp2/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "C:/xampp2/xampp/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
|
I just got up, so I'll play with the info you gave me in a little bit.
- Thanks |
|
Back to top |
|
seph
Joined: 29 Aug 2009 Posts: 3
|
Posted: Sun 30 Aug '09 4:01 Post subject: |
|
|
Woohoo!
Thanks very much for your help. That and I played around with Apache and stopped running it as a service, and bingo!
Thanks a lot |
|
Back to top |
|
|
|
|
|
|