Need help with getting local server up and running.

Dicebat

Well-Known Member
Joined
Mar 15, 2010
Messages
160
Reaction score
1
Location
CT
Hey guys

Trying to get a virtual server running on my Laptop. I've done this a million times before (on XP) and never had a problem.

Now running Windows 7 and I've installed Xampp, WAMP and EasyPHP. All of them installed flawlessly with Apache and MySQL starting up but as soon as I want to browse the site via browser I get the following screen:

Capture.JPG


I've gone to the Internet Information Services Manager, stopped the "manage server" and then the above error disappears, but instead I get a "could not connect to http://127.0.0.1" error page (127.0.0.1 is the default hostname Easy PHP sets due to localhost being incompatible with Windows 7 and Vista).

easyphp.JPG


I've checked the ports as I know that there are issues where port 80 is used by Skype or other programs. The ports are set to 8888 which corresponds with Apache config file.

Stumped. Bummed. And would really appreciate any help!

My laptop's relevant specs:

systemspecs.JPG


I miss XP sometimes
 
Firewall is disabled. I will also try again with WAMP and Xampp and let you know what the results are. Last time I checked the results were the same: Getting nowhere, fast.
 
Last edited:
My Guess is that you have IIS installed as well as Apache and they are conflicting. Make sure you have IIS service disabled (even uninstalled) and then try and reinstall WAMP or XAMPP
 
Thanks for your replies Beachless and James.

I was thinking the very same thing right in the beginning. I don't know why I have IIS 7 installed. Do I need it? Not really? How do I uninstall this burden, I don't see it in the installed programs list.
 
Last edited:
As Beach mentioned,the IIS error there describes the port requested as 80 ^
 
As Beach mentioned,the IIS error there describes the port requested as 80 ^

Indeed. However, the httpd.conf file has the following
Code:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 127.0.0.1:8888
 
Indeed. However, the httpd.conf file has the following
Code:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 127.0.0.1:8888

Regardless of the port you have specified Apache to listen on,the one you requested was port80 ( or redirected to 80 )

did you call the address using http:// or http://xxxx:8888
 
httpd.conf should be:

Code:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80

1. Disable IIS
2. Use virtual hosts under Apache
3. Edit "C:\Windows\System32\Drivers\etc\hosts" to allow for your virtual domain DNS resolution to 127.0.0.1
 
Last edited:
httpd.conf should be:

Code:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80

1. Disable IIS
2. Use virtual hosts under Apache
3. Edit "C:\Windows\System32\Drivers\etc\hosts" to allow for your virtual domain DNS resolution to 127.0.0.1

Ok, I will change the http.conf file's listen to 80

Step 1. - I rate is done as I clicked "stop". I'm not quite sure how to 'Disable IIS' as such.
Step2. - "Use virtual hosts under Apache." - How you do that?
Step 3 - Do I just edit it? - Ok let me try this. But need more info on Step 2 above :)

This is what I have in hosts:

Code:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
127.0.0.1       localhost
 
Last edited:
Regardless of the port you have specified Apache to listen on,the one you requested was port80 ( or redirected to 80 )

did you call the address using http:// or http://xxxx:8888

Yes I called the adress in that format. Still no luck. Let me try PHP's suggestion.
 
I'm guessing that you did not configure the web client properly and its still trying to go to port 80(its the default port if you dont define the port in the url).

If you have a look at all the configs and make sure all the url's have the port as well you wont have issues.

Also using port 8080 is usually better cause most firewalls, browsers these days are open to that port already.

If you dont want IIS to start set the "World Wide Web Service" to manual and click stop in the services configuration tool.

PHP's way will also work.
 
UPDATE:

Seems like I'm getting somewhere. It must've been the listen changing from 8888 to 80 (thanks guys!)

The urls automatically resolve to http://127.0.0.1:8888/home/mysql/ for example but when I remove the 8888, it works perfectly.

I can now see the site's contents on http://127.0.0.1/Headbang/v2/ but with the title "page not found" and the links all point to the live site. (tables were imported into PHPMyadmin from .sql file)

More head scratching. Eish.
 
IT WORKS! Yay

Thanks guys! I knew I could count on my fellow mybroadband peeps! The issue was without a doubt IIS as well as the wrong configuration in Apache's httpd.conf file.

I sorted the links and "page not found" issue (was CMS and database table related)

Only sucky thing is I have to keep changing the http://127.0.0.1:8888 to http://127.0.0.1 in the address bar to view the site. But that's nothing compared to the dilemma I sat with earlier right?
 
Do the following at your own risk!!!

Step 1. Run "CMD" console with "elevation":

Type "cmd" in the quick run field under the Start menu, right click on the "CMD" icon and select "Run as Administrator"

Step 2. Edit the "host" file:

Type "attrib -S -H \Windows\System32\drivers\etc\hosts" in the console window and hit Return (Enter)

Type "notepad \Windows\System32\drivers\etc\hosts" in the console window and hit Return (Enter)

Step 3. Add the reverse DNS pointer directive:

Add "127.0.0.1 [TAB] www.mydomain.com" to the host file, save and exit notepad

Type "ping www.mydomain.com" in console and hit return, The domain should resolve to "127.0.0.1" i.e. localhost.

Step 4. Create root directory for your site:

Create a directory named "mydomain.com" under C:\

Step 5. Add virtual host entry under Apache

Open the Apache2 directory and navigate to the extra directory
Open the httpd-vhosts.conf file and add:

Code:
<Directory "C:/mydomain.com">
    AllowOverride All
    Order allow,deny
    Allow from all

</Directory>

NameVirtualHost www.mydomain.com:80

<VirtualHost mydomain.com:80>
    ServerAdmin [email protected]
    DocumentRoot "C:/mydomain.com"
    ServerName www.mydomain.com
    ServerAlias www.mydomain.com
    ErrorLog "logs/mydomain.com-error.log"
    CustomLog "logs/mydomain.com-access.log" combined
</VirtualHost>

Dump a index.php or index.html file under the site's root directory

Step 6. Restart Apache . . .

Step 7. Open your web browser and navigate to "http://www.mydomain.com", you should see your page displayed, provided IIS where disabled correctly and no other applications engaged Port 80.
 
Top
Sign up to the MyBroadband newsletter
X