How to Put My Wamp Online for Someone to Access

How can I put my WAMP online for someone to access?

This works very easily for me on WinXP.

  • Fire up the command prompt and enter ipconfig /all - get your local IP address
  • Log into your router and set up port forwarding to forward HTTP to your local IP address
  • Click on your WAMP icon and click again on "Put Online"
  • Go to your remote IP (you can find it somewhere like http://www.whatsmyip.org/)

wamp server put online for anyone to access

Other people trying to access your computer should know where to look.

Your server should then be referenced in the hosts file of their machine, except that IP should be resolvable such as

your.local.ip         btcGame.local

How to enable local network users to access my WAMP sites?

See the end of this post for how to do this in WAMPServer 3

For WampServer 2.5 and previous versions

WAMPServer is designed to be a single seat developers tool. Apache is therefore configure by default to only allow access from the PC running the server i.e. localhost or 127.0.0.1 or ::1

But as it is a full version of Apache all you need is a little knowledge of the server you are using.

The simple ( hammer to crack a nut ) way is to use the 'Put Online' wampmanager menu option.

left click wampmanager icon -> Put Online

This however tells Apache it can accept connections from any ip address in the universe. That's not a problem as long as you have not port forwarded port 80 on your router, or never ever will attempt to in the future.

The more sensible way is to edit the httpd.conf file ( again using the wampmanager menu's ) and change the Apache access security manually.

left click wampmanager icon -> Apache -> httpd.conf

This launches the httpd.conf file in notepad.

Look for this section of this file

<Directory "d:/wamp/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
# Require all granted
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
</Directory>

Now assuming your local network subnet uses the address range 192.168.0.?

Add this line after Allow from localhost

Allow from 192.168.0

This will tell Apache that it is allowed to be accessed from any ip address on that subnet.
Of course you will need to check that your router is set to use the 192.168.0 range.

This is simply done by entering this command from a command window ipconfig and looking at the line labeled IPv4 Address. you then use the first 3 sections of the address you see in there.

For example if yours looked like this:-

IPv4 Address. . . . . . . . . . . : 192.168.2.11

You would use

Allow from 192.168.2

UPDATE for Apache 2.4 users

Of course if you are using Apache 2.4 the syntax for this has changed.

You should replace ALL of this section :

Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost

With this, using the new Apache 2.4 syntax

Require local
Require ip 192.168.0

You should not just add this into httpd.conf it must be a replace.

For WAMPServer 3 and above

In WAMPServer 3 there is a Virtual Host defined by default. Therefore the above suggestions do not work. You no longer need to make ANY amendments to the httpd.conf file. You should leave it exactly as you find it.

Instead, leave the server OFFLINE as this funtionality is defunct and no longer works, which is why the Online/Offline menu has become optional and turned off by default.

Now you should edit the \wamp\bin\apache\apache{version}\conf\extra\httpd-vhosts.conf file. In WAMPServer3.0.6 and above there is actually a menu that will open this file in your editor

left click wampmanager -> Apache -> httpd-vhost.conf

just like the one that has always existsed that edits your httpd.conf file.

It should look like this if you have not added any of your own Virtual Hosts

#
# Virtual Hosts
#

<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

Now simply change the Require parameter to suite your needs EG

If you want to allow access from anywhere replace Require local with

Require all granted

If you want to be more specific and secure and only allow ip addresses within your subnet add access rights like this to allow any PC in your subnet

Require local
Require ip 192.168.1

Or to be even more specific

Require local
Require ip 192.168.1.100
Require ip 192.168.1.101

How to bring wamp server online?

It should have been a simple case of left clicking the WAMPManager menu and clicking Put online.

What that would have done is changed this section of httpd.conf from this:

If using Apache 2.2.x

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

To this:

#   onlineoffline tag - don't remove
Order Allow,Deny
Allow from all

If using Apache 2.4.x

#   onlineoffline tag - don't remove
Require local

To this:

#   onlineoffline tag - don't remove
Require all granted

And strictly thats all you should have needed to do!

But as you have done some manual messing with httpd.conf here are some things you need to check. I am assuming you wanted to change the port to 8080 rather than thinking you had to for some reason. If you didnt want to change port number to 8080 then use 80 in the following info instead of 8080. Changing to 8080 just makes life more complicated for your users, but if this is just a play site that does not really matter I suppose.

httpd.conf

# as your router probably does not support IPV6 change so apache only listens on IPV4
# you dont need to put the actual ip address of this PC in here as you say you did.

Listen 0.0.0.0:8080

# ServerName port need to match the Listen, your question made me think you may have left this as localhost:80
ServerName localhost:8080

If using Apache 2.2.x

# Assuming your site is in c:\wamp\www ( this section should already exist I just removed all the comments for brevity)
<Directory "d:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all

#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
</Directory>

If using Apache 2.4.x

# Assuming your site is in c:\wamp\www ( this section should already exist I just removed all the comments for brevity)
<Directory "d:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all

#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Require from all
</Directory>

If you made the common mistake of changing this section, change it back to this, or you will be giving access to your C:\ to anybody.

If using Apache 2.2.x

<Directory />
Options FollowSymLinks
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

If using Apache 2.4.x

<Directory />
Options FollowSymLinks
Require all denied
</Directory>

I hope something in here makes you stumble upon your mistake or ommission.

EDIT: Additional info

phpMyAdmin is protected from prying eyes like this:

edit c:\wamp\alias\phpmyadmin.conf

Alias /phpmyadmin "d:/wamp/apps/phpmyadmin3.5.1/"

# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#

<Directory "d:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>

See the line Allow from 127.0.0.1 that stops anyone not on the same PC as the database using it.

So if you are trying to access that from the internet, it wont work.

I suppose you could TEMPORARILY change it to :

Order Allow,Deny
Allow from all

Or better still if you know the ip address of where you are going to test it from you coudl do

Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1 localhost
Allow from xxx.yyy.zzz.aaa

Where xxx.yyy.zzz.aaa is your friends IP address.

How to make WAMP accessible over the internet?

I'm using Wampserver 2.5 64bit on window 7, and this is what I found:

//You need to find this

# Controls who can get stuff from this server. #
# onlineoffline tag - don't remove
Require local

then change to

# Controls who can get stuff from this server. #
# onlineoffline tag - don't remove
Require all granted

Then you can access your site via LAN IP address. For example http://192.168.2.7/.

However, this may cause a bug that makes Wampserver can not be restarted.

Process to put wamp server online

Wamp server is a Windows Web development environment for Apache, MySQL, PHP databases.it's a Web development platform on Windows that allows you to test dynamic Web applications LOCALLY.

You can't host you website with this.

You need a web host like OVH.

However, you can register a free DDNS ( like no-ip) ,implement it with your internet box, and configure WAMP with this.

And you will be able to host your website with your own computer

you can find a tutorial here : http://www.noip.com/support/.../diy-hosting-using-no-ip-wamp/

WAMP - World Wide Access

It is possible, yes.

I would suggest momentarily disabling the firewalls, trying the connection and seeing if it works. If it does, you know it's firewall - turn windows one on and the other one by one to eliminate them. If it doesn't, you know you have issues.

Remember to run httpd -t from the command prompt to verify that your config is free of errors and of course make sure you restart apache and the W is green in the task bar. Make sure it actually is restarting, too - as some times things like mail servers (hMailServer I am particularly aware of) can stop it happening. In this case you need to restart the wampapache service from the services control panel (Start > services.msc).

Here's some extra info though, as you might be better setting up dynamic DNS. I use DynDNS and have the following vhosts conf:

<VirtualHost *:80>
ServerName mysite.dyndns.org

DirectoryIndex index.html index.php
DocumentRoot /home/mysite/
<Directory /home/mysite/>
AllowOverride All
Allow from All
</Directory>

# some logging stuff I cut out here

</VirtualHost>

Put that in mysite.conf inside c:/wamp/bin/apache/Apache2.2.21/conf/virtual. The mysite.dyndns.org is the host I have set up at dyndns. Finally, to make virtual hosts work, add this to your httpd.conf:

NameVirtualHost *:80
Include "c:/wamp/bin/apache/Apache2.2.21/conf/virtual/*.conf"

Now, if it still doesn't work you you probably have other issues. Can you telnet on port 80 to that above address? See above firewall issues.

Enable local network users to access WAMP sites, but except localhost page

WAMPServer 2.5 uses Apache 2.4

So first of all dont mix Apache 2.2 syntax with Apache 2.4 syntax (it confuses Apache very easily) in the same section. It is better to use just the new Apache 2.4 syntax anyway.

<Directory "c:/wamp/www/"> 
Require local
</Directory>

<Directory "c:/wamp/www/my_site1/">
Require all granted
# plus any other Options etc that are required by this site
</Directory>


Related Topics



Leave a reply



Submit