Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've installed WAMPserver 2.4 on a Windows 7.1 PC.

I clicked on the WAMPserver icon in the system tray, selected "put online".

If I load http://hostname/ (where hostname is my computer's name) in my browser, I receive the error 403 Forbidden

What do I need to do to make my WAMPserver public? (within the LAN and WAN)

Edit: Within httpd.conf, there is this section:

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# 
ServerName localhost

If I changed localhost to my hostname, restarted Apache, the same error remained.

share|improve this question

4 Answers 4

I'd guess it's only listening on 127.0.0.1:80.

Open the apache-config (typical names are httpd.conf, apache.conf...) and search for a line:

Listen 127.0.0.1:80

then edit that line to

Listen 80

or

Listen your.dom.ain:80

Please take a look at the apache documentation for more information. http://httpd.apache.org/docs/2.2/en/bind.html

share|improve this answer
    
It was already listed as Listen 80 so I changed it do Listen hostname:80, restarted Apache and the same error occurred. –  Steve Jan 22 at 4:39

allow your host from apache httpd configuration file

default allow deny in httpd.conf file

 Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
</Directory>

Add your host in allow list

Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
     Allow from yourhost
</Directory>
share|improve this answer
    
I added Allow from yourhost, restarted Apache, and the same error occurred. –  Steve Jan 22 at 4:40
    
you just added simply yourhost or actual your host? –  eramit2010 Jan 22 at 5:20
    
My host name... –  Steve Jan 22 at 6:26

If configuring your .conf file doesn't work.

You need to edit your host file. By going to: C:\Windows\System32\drivers\etc. It "may" work

Uncomment the 127.0.0.1 localhost line and remove the line below it.

So your host file will look like this

# 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

delete your old or put your old host file as ".OLD". or you can copy and replace. Hope it works for you. :))

share|improve this answer
    
I tried this, restarted Apache, and the error remained. I added 127.0.0.1 hostname at the end with no difference. –  Steve Jan 22 at 4:44
up vote 0 down vote accepted

Because I am running WAMP 2.4.x, I edit my httpd.conf, and find:

# onlineoffline tag - don't remove
  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1
  Allow from ::1
  Allow from localhost

and add:

 Allow from 10.6.0.138
 Allow from 10.2.26

My IP address is 10.6.0.138.

My colleague's IP address is 10.2.26.*

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.