WAMP - World Wide Access - apache

I have installed WAMP on my computer running Windows 7. The Apache is running on port 80. I am searching here and there and everybody has its own solution. None of it fulfil the requirement.
Information:
Local IP: 192.168.15.52
External IP: 139.190.233.170 (Collected from whatsmyip.org)
Changed httpd.conf file:
ServerName 139.190.233.170:80
DocumentRoot "c:/wamp/www"
<Directory "c:/wamp/www">
Options Indexes FollowSymLinks
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
I have also added some rule for port 80 in Windows Firewall and also forward port for my LAN IP. Here is the pic:
Nothing happens after all that. Clicking "Put Online" and watching it to go green, nothing happens. I can access www directory by either localhost IP address (127.0.0.1) or my LAN IP address (192.168.15.152).
Questions:
Is it really possible to put WAMP for world wide access?
If it is possible, then how?
I have been searching around but none of them works. I have also searched SO:
Unable to access wamp server from outside my computer
How can i put my WAMP online for someone to access?
e.t.c
Some external sites:
http://www.computerforums.org/forums/server-administration/wamp-server-wont-work-outside-lan-help-207071.html
http://answers.yahoo.com/question/index?qid=20091005091249AAQrHxR
http://wordpress.org/support/topic/problem-accessing-wp-externally-using-wamp
http://wordpress.org/support/topic/self-hosted-wp-wamp-server-not-connecting-externally
http://webhosting.bigresource.com/WAMP-Access-Website-with-my-WAN-IP-pg1Bh4bJ.html
http://guides.jlbn.net/setaccess/setaccess1.html

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.

Related

WAMP 3.1 setup on Windows 10. Can't access online

I've been trying two days straight to make this work. I want to make my server available online so I can work with another guy on this project. The goal is mainly to have two things:
The www website available through my public ip
MySQL available to him so he can work
This computer has:
Windows 10 Pro
WAMP 3.1
Node.JS
I went through the configuration of the vhost of wamp, port forwarding in my router and this doesn't work:
# Virtual Hosts
#
<VirtualHost *:80>
ServerName 192.168.2.51
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I put back what was in http.conf because that's the first thing I modified at first until I discover the new WAMP wasn't using this anymore.
I though Node.JS could conflict so I shut it down. I also shut most process using port 80 but still no luck.
I used an online port checker. The result is positive and it seems to go through, at least from their POV. And I did a netstat to check if I had 0.0.0.0:80 so everything seems fine on that side.
The port 80 tester of WAMP even says it's fine so I'm guessing it must be in the Virtual host but I have no idea how to set it up properly and documentation is not helping a lot.
What am I missing?
regards,

Can't access apache from Internet

It must be a common question but I've not found any appropriate answer:
I have a website on apache server running in my office LAN. I can view pages from all computers (even smart-phones via Wifi).
All computers are connected to a router (with static IPs) which supports port forwarding.
I forwarded the routers port 8080 to the internal IP 192.168.1.5:80 which is the apache box (xubuntu 14.04).
The problem is that when I try to view the site from the internet, I always get connection refused response. I tried the http://www.canyouseeme.org but still the response is the same. This happens both when I try from my LAN->Internet->Router->Apache or directly from home Internet->Router->Apache.
I know (rather suspect) that the routed does its job because if I hit the external static IP:80 I get into its interface while when I hit IP:8080 I get the connection refused response. Canyouseeme agrees (it times out as it's waiting for a password).
Funny(?) thing is that I have not installed a firewall and the apache2.conf is the default.
Can somebody help?
Finally it is all clear; my ISP didn't allow to set the routers firewall so every setting I made was void.
So to recap first make sure that your ISP is really forwarding your ports.
However I couldn't up my site (zoneminder app) so I write down the solution in case someone else finds it useful:
First of all I assume that Apache is running without problems with the default settings. In case that you want to make a site (in your system you'll see directory) available as the root site of your apache serer, you must create a "rule" for apache:
First copy the 000-default.conf file that lies in /etc/apache2/sites-available/ directory (in Ubuntu systems) by executing
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/mysite.conf
The mysite.conf file will be a setting for virtual host and you will need to add/change contents accordingly with:
DocumentRoot /my/site/directory
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /my/site/directory/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Don't forget to change (if needed) the port apache is listening to by editing the /etc/apache2/ports.conf.

XAMPP apache server not using the ports I desire, not certain why

So, I've been setting up this HTTP server for a school project that has to be able to maintain multiple domains through virtual hosts. Using XAMPP I have my server set up, I thought I'd done it properly but perhaps not.
I had heaps of issues with not being able to listen to a port, to solve this I used (in httpd.conf under apache/conf/)
Listen 0.0.0.0:8080
ServerName localhost:8080
If I used 80/81/8080/321/any combination that did not have the prefix 0.0.0.0 it told me the port could not be listened or whatever (sorry, a little rusty with my syntax).
I set up my first virtual host up like so (under apache/conf/extra/httpd-vhosts.conf):
NameVirtualHost *:8080
<VirtualHost *:8080>
DocumentRoot "H:/xampp2/xampp/htdocs"
ServerName localhost:8080
<Directory "H:/xampp2/xampp/htdocs">
Option Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I thought this seemed all good and well and I don't believe I've modified anything else. To me, I would expect that this means my Apache server would use port 8080 for the server? However, when I start Apache in XAMPP it states quite clearly
Apache started [Port 80]
Why would this be port 80?
In conjunction, localhost:8080 doesn't navigate me to the documents, but localhost:80 or localhost do. I presume that this just means it's still on port 80. I've tried resetting my computer and XAMPP.
If you need any more information, please let me know. I tried following guides such as this one: http://ailoo.net/2008/07/set-up-multiple-virtual-hosts-on-xampp-for-windows/
Cheers.
Oh, I also edited my Windows HOSTS file; it looks like so:
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
::1 localhost
127.0.0.1 localhost:8080
Edit: New error... Now getting this when I init, doesn't seem to be affecting it though:
ERROR: Status Check Failure [3]
This program must be run from your XAMPP root directory.
It is being run from teh root directory as far as I can tell.
Ok Im not advanced in this area either. However after much playing around with XAMPP and following a few different guides I got mine working.
The Host under drivers seems abit weird. I declared mine as:
127.0.0.1:8080 test.localhost.com
127.0.0.1:8080 test2.localhost.com
Back up you Xampp, then extract a clean install to C: - Just because that Status check failure sounds like bad news.
!Remember to run setup_xampp.bat from the xampp directory and install the apache service!
Then under you httpd.conf add:
ServerRoot C:\xampp\apache
Listen 7070
Listen 8080
Listen 9090
Apache might not like that at first but meh.
The ServerRoot may already be declared above the Listen spot so just double check.
After that head to C:\xampp\apache\conf\extra.
Edit the httpd-vhosts.conf.
Under the section Name-based virtual hosting add:
NameVirtualHost *:7070
NameVirtualHost *:8080
NameVirtualHost *:9090
There will be a couple of examples of virtual hosts below that. Add:
<VirtualHost *:7070>
DocumentRoot "C:/xampp/www/YOURWEBSITEDIR1"
ServerName test.localhost.com
<Directory "C://xampp/www/YOURWEBSITEDIR1">
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:9090>
DocumentRoot "C:/xampp/www/YOURWEBSITEDIR2"
ServerName test2.localhost.com
<Directory "C://xampp/www/YOURWEBSITEDIR2">
Allow from all
</Directory>
</VirtualHost>
Not the double slash in the Directory tag. Now ensure there is an index.html under each of those directories. Restart the apache (Stop, start).
I cant navigate to the test.localhost.com URLs, probably due to the fact they are terribly wrong in the HOSTs config. Though I can connect to 127.0.0.1:7070, 127.0.0.1:9090 and access the webpages from there.
Also 127.0.0.1:8080 connects me to the xampp welcome panel that localhost used to connect you too.
Hope this helps and good luck!
I'm pretty sure that saying 'listening on port 80' is hard-coded into XAMPP, regardless of the port you use. Thus, your code should work fine.
In my .conf file, it just says "listen 80" instead of Listen 0.0.0.0:8080
Cheers.

XAMPP Apache site-root-relative links work locally, fail when accessing dev site via remote machine over LAN

Am trying to set up multiple site development areas on a single server machine, then work on content from other computers over LAN. (Excuse the general wording of my questions, the site keeps preventing me from entering example URLs, etc.)
When I work directly on the server machine, entering
my-virtual-host-name:port#
as the URL everything works beautifully. It correctly resolves all links, image references, etc, as being relative to the site root.
When I connect from a different machine, over our Lan, entering
server-ip-address:port#
I get automatically redirected to a default XAMPP welcome page (So I am at least connecting to the server)
I figured how to setup an Alias statement, so that, for example something like
server-computer-ip-address:port#/alias-for-file-path
gets me to the home page for my site. But subsequently when I click on links, for example
/products-services
which I would want to go to
server-ip-address/alias-for-file-path/products-services
it instead resolves to
server-ip-address/products-services
Relevant settings on the computer running the Apache server
IP Address: 192.168.22.12
In Windows Host file: 127.0.0.1 localhost mySiteName
In httpd-vhosts.conf:
NameVirtualHost *
<VirtualHost *>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot "D:\companysites\newproducts\mysite"
ServerName mySiteName
<Directory "D:\companysites\newproducts\mysite">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
In httpd.conf (assigning alternate port to Apache, since 80 is otherwise used):
Listen 3399
Have tried a bunch of things not detailed here, trying to figure out how to correctly define some combination of server machine and remote machine virtual host definitions and url settings, as well as much web searching and zero luck so far!
At present you've set it up so all Virtual Hosts are listening for the same connection. Same ip from all ports. *
I figured it out, finally! Hopefully this will be useful and clear to someone else! (I am new to this, so may be obvious to others - there were some basic things I didn't understand and now do...)
In httpd-vhosts.conf file, you can:
Create any number of "Listen" statements, each with a unique port number. So, for example.
Listen 8885
Listen 8886
Listen 8887
Then you can create any number of VirtualHost definition sections, associating one of the above ports with each, for example:
NameVirtualHost *
<VirtualHost 192.168.22.11:3399>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost 192.168.22.11:3388>
DocumentRoot "file-system/path"
ServerName mySiteName
<Directory "file-system/path">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
When connecting to the server from a remote computer, it is not possible to use any combination of alias server names and/or alias file path names (at least, didn't work for me - if there is a way, I'd be interested to know). Instead, always enter ip-address:port#, for example, enter, as the URL to one of the defined sub-domains on the server machine:
192.168.22.11:3399

Cannot access wamp server on local network

I want to host a website on my local network. For some reason I can only access wamp in my local computer.
I have 2 computers in my network. Both computer A and computer B have wamp server installed. when I type the ip address of computer A from computer B I am able to connect to it. But when I do it the other way around it does not work! In other words when I type the ip address of computer B from computer A the browsers says: server at 192.168.0.120 is taking to long to respond.
Things that I have done in order to solve the problem on computer B: (remember I want to connect to computer B from computer A)
1) turn off the firewall
2) Uninstall wamp and reinstall it.
3) turn off the anti-virus.
4) turn off windows firewall
5) Place wamp online and after putting it online restart all services
after doing all those steps I still cannot connect to it from computer B!
I have not chaged any ini file plus I have uninstall it and install it again so why is it not possible to connect to it!? I have used wamp for the last 3 years and I have never experienced this.
Also wamp is the only web server that I have installed on this computer. I don't have IIS nor any other web server installed on my computer.
Turn off your firewall for port 80 from any address. Turn off 443 if you need https (SSL) access. Open the configuration file (http.conf) and find the lines that say:
Allow from 127.0.0.1
Change them to read
Allow from all
Restart the wampserver. It will now work. Enjoy!!
Perhaps your Apache is bounded to localhost only. Look in your apache configuration file for:
Listen 127.0.0.1:80
If you found it, replace it with:
Listen 80
Then restart Apache.
(More info about Apache Binding)
1.
first of all
Port 80(or what ever you are using) and 443 must be allow for both TCP and UDP packets. To do this, create 2 inbound rules for TPC and UDP on Windows Firewall for port 80 and 443.
(or you can disable your whole firewall for testing but permanent solution if allow inbound rule)
2.
If you are using WAMPServer 3 See bottom of answer
For WAMPServer versions <= 2.5
You need to change the security setting on Apache to allow access from anywhere else, so edit your httpd.conf file.
Change this section from :
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
To :
# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
if "Allow from all" line not work for your then use "Require all granted"
then it will work for you.
WAMPServer 3 has a different method
In version 3 and > of WAMPServer there is a Virtual Hosts pre defined for localhost so dont amend the httpd.conf file at all, leave it as you found it.
Using the menus, edit the httpd-vhosts.conf file.
It should look like this :
<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp/www
<Directory "D:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Amend it to
<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp/www
<Directory "D:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Note:if you are running wamp for other than port 80 then VirtualHost will be like VirtualHost *:86.(86 or port whatever you are using) instead of VirtualHost *:80
3.
Dont forget to restart All Services of Wamp or Apache after making this change
go Setting -> General and change url in WordPress Address (URL) and Site Address (URL)
enter your pc name or your ip address in place of localhost
before : http://localhost/wordpress-test
after : http://your-pc-name/wordpress-test
...and that's it..you can access wordpress from any pc in your LAN...!!!
I had to uninstall my anti virus! Before uninstalling I clicked on the option where it said to disable auto-protect for 15 min. I also clicked on another option that supposibly disabled the anti-virus. That still was blocking my server! I don't understand why Norton makes it so hard to literally stop doing everything it's doing. I know I could had solve it by adding an exception to the firewall but Norton was taking care of windows firewall as well.
Wamp server share in local network
Reference Link: http://forum.aminfocraft.com/blog/view/141/wamp-server-share-in-local-netword
Edit your Apache httpd.conf:
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
#Deny from all
and
#onlineoffline tag - don't remove
Order Deny,Allow
Allow from all
#Deny from all
to share mysql server:
edit wamp/alias/phpmyadmin.conf
<Directory "E:/wamp/apps/phpmyadmin3.2.0.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
#Deny from all
Allow from all
I had the same issue, tried all nothing works, following works for me
Following is what i had
#onlineoffline tag - don't remove
Require local
Change to
Require all granted
Order Deny,Allow
Allow from all
I know this is an old post BUT I have been having problems getting WAMP server seen on my windows 7 pro network for days, tried all of the solutions offered (including changing windows system files) but still not working. finally in pure desperation I put everything on the system back as it was and installed WAMP Server on a different drive (E:\WAMP ) in my case. The result was it worked perfectly first time with no editing configs or messing with the system. Other users may wish to try this before reaching the 'tear your hair out stage', it certainly saved my sanity or what I have left of it
I hope this helps someone
Dave
If you are using wamp stack, it will be fixed by open port in Firewall (Control Pannel). It work for my case (detail how to open port 80: https://tips.alocentral.com/open-tcp-port-80-in-windows-firewall/)
I had the same problem but mine worked fine. Turn off your firewall, antivirus. Make sure your port 80 is enabled and both pcs are set to be remotely accessed. In each pc under users, add new user using the host ip address of the other pc. Restart all services. Put your wampserver online. It should connect