Http://localhost not working

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

Http://localhost not working

Postby jeweline » 07. September 2009 19:17

Hi all.

I'm a designer who knows very little (practically nothing) about programming so programming dynamic sites is challenging to say the least! And don't really remember how to use DOS either. Ulitimately, I'm trying to use PHP with Dreamweaver CS4.

I've just installed Xampp on my Windows XP (sp2) machne. Following instructions in a book called "Dreamweaver CS$ with CSS, Ajax, and PHP", I moved the "server root to a different location, as follows:"
    I created a new folder called htdocs located at the top level of my C drive. (C:/htdocs)
    I edited the Apache configuration file, httpd.conf I changed the pathname from DocumentRoot "C:/xampp/htdocs" to "C:/htdocs".
    I changed the line that read "<Directory C:/xampp/htdocs" to <Directory "C:/htdocs">

I created a virtual host on Apache so that I could test multiple sites. I registered the virutual host on Windows by doing the following:

1. I placed my virtual host in a folder called C:\vhosts and a subfolder called silverlinemarket
2. I opened C:\WINDOWS\system32\drivers\etc\hosts in Notepad and looked for the following line at the bottom of the file: 127.0.0.1 localhost
3. On a sparate line, I entered 127.0.0.1 silverlinemarket
4. I opened the Apache configuration file, http;d.conf. I scrolled down to the Supplemental configuration section at the end of httpd.conf. In the follwing section, "Include conf/extra/httpd-vhost.conf", I made sure this line was uncommented by making sure the"#" was not there. I saved the file and then closed it.
5. I opened httpd-vhosts.conf. After the "You may use the command line option '-S' to verfy your virtual host configuriation " I typed the following:

<Directory C:/vhosts>
Order Deny, Allow
Allow from all
</Directory>

6. For my virtual host definitions I used the following:
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/vhosts/silverlinemarket
ServerName silverlinearket
</VirtualHost>

When I open the Xampp Control Panel Application, it says the following:

Xampp Control Panel Version 2.5.8 (2009-7-28)
Xampp for Windows Version 1.7.2
Windows 5.1 Build 2600 Platform 2 Server Pack 2
Current Directory: C:\xampp
Status Check OK
Busy...
Apache service started


My problems are when I type "http://localhost/" in Google's browser I get the following message: "Oops! This link appears to be broken." In Firefox I get the following, the status bar message says "Waiting for localhost..." and it looks like the browser justs hangs up. I'm trying to set up a testing environment on my machine locally. I want to test out my php code locally on my machine before I upload it to a remote web server. I don't want to crash a remote server by testing there. I want to make sure that my code works before I upload it.
jeweline
 
Posts: 8
Joined: 07. September 2009 18:40

Re: Http://localhost not working

Postby Wiedmann » 07. September 2009 20:03

I've just installed Xampp on my Windows XP (sp2) machne.

XAMPP and the demopage was working, before you have changed anything in the configuration?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Http://localhost not working

Postby jeweline » 07. September 2009 21:02

Thanks for responding!

No it wasn't working
jeweline
 
Posts: 8
Joined: 07. September 2009 18:40

Re: Http://localhost not working

Postby Wiedmann » 07. September 2009 21:08

Apache service started

There is a green "running" next to the Apache start button in the Control Panel.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Http://localhost not working

Postby jeweline » 07. September 2009 21:13

Thanks so much! No, there is no green "running" next to apache. There is beside MySQL.
jeweline
 
Posts: 8
Joined: 07. September 2009 18:40

Re: Http://localhost not working

Postby jeweline » 07. September 2009 21:14

Although there is a "Apache service started" statement at the bottom of the screen.
jeweline
 
Posts: 8
Joined: 07. September 2009 18:40

Re: Http://localhost not working

Postby Wiedmann » 07. September 2009 21:18

there is no green "running" next to apache.

So Apache is not started.
--> without a running webserver, you can't connect to it.

----> read the "error.log"
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Http://localhost not working

Postby jeweline » 07. September 2009 21:33

No. There is no green light next to apache.
jeweline
 
Posts: 8
Joined: 07. September 2009 18:40

Re: Http://localhost not working

Postby jeweline » 07. September 2009 21:35

I'm sorry, but I don't know how to read the error log. Could you tell me where it is? Thanks!
jeweline
 
Posts: 8
Joined: 07. September 2009 18:40

Re: Http://localhost not working

Postby jeweline » 07. September 2009 21:37

I found the error log. Here's what it contains:

(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Syntax error on line 188 of C:/xampp/apache/conf/httpd.conf:
DocumentRoot must be a directory
Syntax error on line 188 of C:/xampp/apache/conf/httpd.conf:
DocumentRoot must be a directory
Syntax error on line 188 of C:/xampp/apache/conf/httpd.conf:
DocumentRoot must be a directory
Syntax error on line 188 of C:/xampp/apache/conf/httpd.conf:
DocumentRoot must be a directory
Syntax error on line 188 of C:/xampp/apache/conf/httpd.conf:
DocumentRoot must be a directory
Syntax error on line 188 of C:/xampp/apache/conf/httpd.conf:
DocumentRoot must be a directory
Syntax error on line 188 of C:/xampp/apache/conf/httpd.conf:
DocumentRoot must be a directory
jeweline
 
Posts: 8
Joined: 07. September 2009 18:40

Re: Http://localhost not working

Postby Wiedmann » 07. September 2009 21:51

Another server is running, and you have changed the DocumentRoot in httpd.conf to a wrong value (or you have deleted this directory).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Http://localhost not working

Postby jeweline » 07. September 2009 22:01

I checked the httpd.conf file, and where I had changed the DocumentRoot statement to point to "C:/htdocs" is what was causing the error. I changed it back to the original statement: "C:/xampp/htdocs" and the default page displayed in the browser when I tested http://localhost or http://127.0.0.1.

Thanks!
jeweline
 
Posts: 8
Joined: 07. September 2009 18:40


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 61 guests