Page 1 of 1

Users can't see my site

PostPosted: 11. April 2011 19:02
by BobBarton
Hi,

I've set up XAMPP and Drupal on my Windows 7 machine.

It all works fine but ONLY from my machine. I use http://localhost/drupal and it works!

But LAN and WAN users get nothing.

As an example, from another machine on my LAN I try: http://192.168.0.100/drupal and it can't find my site. (192.168.0.100 is my LAN side IP). It can't find http://192.168.0.100 either (just to see if the user can see the xampp panel).

I have Apache allowed through my firewall for both Public and Private networks. But it doesn't work EVEN when I turn the firewall off.

What am I missing here? Do I have to allow non-local users? If so, how and where?

P.S. I'm a bit of a newbe so please be gentle.

Thanks,

BB

Re: Users can't see my site

PostPosted: 12. April 2011 02:05
by Sharley
Always give the XAMPP version as versions are quite different how they do things.

In 1.7.4, which is what I believe you have installed, you will need to add to the configuration file like so:
Open or drag the \xampp\apache\conf\extra\httpd_xampp.conf file into your notepad or similat text editor and add this
192.168.0.0/16
to the last section of this file so it looks like this
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
Allow from 192.168.0.0/16
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
Save the file and then restart Apache and now try again to access from 192.168.0.100 LAN PC.

Re: Users can't see my site

PostPosted: 12. April 2011 13:03
by BobBarton
Thank you Sharley!

Thanks to you I can now connect from within my LAN.

BUT I'm still unable to connect from the WAN.

I played a bit with the settings you gave and finally came down to this:
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info|webdav))">
Order allow,deny
#Allow from all
#Allow from 127.0.0.0/8
#Allow from 192.168.0.0/16
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

IOW I'm trying to open Apache to everyone.

The above still works from the LAN.

I set my router to forward inbound traffic on port 82 to port 80 on my machine. On the remote machine I try to browse to http://<my wan ip>:82/drupal/
But this does not work.

Am I still missing something?

Oh, my XAMPP version is 1.7.4 as you had guessed.

Thanks,

BB

Re: Users can't see my site

PostPosted: 12. April 2011 13:16
by Sharley
Return your httpd-xampp.conf file to where it worked for the LAN as it is a security feature that denies access to the sensitive files and folders of your server from the WAN.

It has often been a posted issue in these forums that you can't access from your WAN from within your LAN - something to do with loop backs, but Google will help with understanding why this is so.

Others from the Internet will be able to access your server if your port forwarding is setup correctly in your router.

To see if your server is available from the Internet go here:
http://centralops.net/co/DomainDossier.aspx

Add your WAN IP to the text box provided and then tick all the boxes and down at the botton you should see your server on port 80 of the scan - it will also give you a host of information you may know already or you may not.

There are other methods of ascertaining that your WAN is accessible and a forum search may possibly reveal these in some of the many posts relating to topics similar to yours.

You should also be aware that XAMPP is only for development not for production as allowing access from the Internet for anyone can compromise your server and could possibly end up being a bot or a zombie etc.

Try and learn about how to harden your server if you intend to go ahead anyway - read the readme-en.txt file about security.

Good luck. :)

Re: Users can't see my site

PostPosted: 12. April 2011 23:41
by BobBarton
Well, I've tried everything I can think of:

1. Putting the XAMPP PC in my router's DMZ
2. Listening on several different ports and then trying to connect via those ports
3. Putting Allow from all in the LocationMatch block of httpd-xampp.conf
4. All of the above with Windows Firewall OFF

Nothing works.

I'm fairly convinced that I'm missing an XAMPP/Apache setting somewhere; but WHERE???

Does anyone know of a simple program (a server) that would listen on a selected port and report back when it gets a hit? I could use such a program in place of Apache to see if I get a hit. That would prove that the problem is somewhere in the XAMPP/Apache setup.

Any other ideas? I'm desperate!

Thanks,

BB

Re: Users can't see my site

PostPosted: 13. April 2011 01:49
by BobBarton
Hi,

I take back what I said in my previous post. It does NOT seem to be a problem with XAMPP/Apache settings.

I ran WireShark on my PC and there is ZERO traffic from or to the WAN side PC.

So now I'm back to my original state of utter confusion.

Any ideas would be greatly appreciated.

Thanks,

BB

Re: Users can't see my site

PostPosted: 13. April 2011 02:04
by Sharley
As I said before you can't access your server from the LAN using the WAN IP address.

If you paste the IP here or PM me the IP then I can tell you if I can see your drupal web site from the Internet if you are having trouble understanding that Domain Dossier is doing exactly that when it scans port 80 and shows the server signature.
If it can't connect it will tell you so.

Re: Users can't see my site

PostPosted: 13. April 2011 03:16
by BobBarton
Hi Sharley,

I'm sending my WAN side IP in a PM.

I am not trying to access my server from the LAN using the WAN IP address.

I'm trying to access my server from the WAN using my WAN IP.

I am now able to access the server from my LAN using my LAN side IP. That's not the problem at this point; although it was when I first started this thread.

I thought I had responded to your advice re Domain Dossier earlier but all the tests worked perfectly except the last one which returned this:
Service scan
FTP - 21 Error: TimedOut
SMTP - 25 Error: TimedOut
HTTP - 80 Error: TimedOut
POP3 - 110 Error: TimedOut
IMAP - 143 Error: TimedOut

That didn't surprise me since my ISP undoubtedly blocks these.

To get around the block, I set Apache to listen on port 90 and I try to reach it from the WAN by http://<my wan ip>:90/drupal

Please see my PM and many thanks for your help!

BB

Re: Users can't see my site

PostPosted: 13. April 2011 03:40
by Sharley
BobBarton wrote:Please see my PM and many thanks for your help!
No messages from you in my inbox.

Re: Users can't see my site

PostPosted: 13. April 2011 04:01
by BobBarton
Sorry Sharley,

I thought I had sent the PM but guess I messed up. Anyway, you should have it now.

Thanks,

BB

Re: Users can't see my site

PostPosted: 13. April 2011 04:25
by Sharley
Message received, understood and answered. :)

For others reading this I suggest reading these search results as the traceroute is ending up at the IP given but it gets no further.

Possibly a router issue but the solution may be in the above search results.

BTW, can you access your Drupal site using http://locahost:90/drupal or via the 8080 port your server is listening on just to make sure that the server is indeed listening on those ports.

If so then IMHO the server settings are correct especially if you returned the httpd-xampp.conf file back to it's safe state as mentioned above.

Re: Users can't see my site

PostPosted: 13. April 2011 10:37
by BobBarton
Hi Sharley,

Again, many thanks for all your help!

Please see my responses below.

Sharley wrote:Message received, understood and answered. :)
... as the traceroute is ending up at the [router using the ] IP given but it gets no further.


I wouldn't expect the traceroute to go any further than to the router since the traceroute was to the router's IP.

Sharley wrote:Possibly a router issue but the solution may be in the above search results.


I read the search results but they don't help in this instance.

Sharley wrote:BTW, can you access your Drupal site using http://locahost:90/drupal or via the 8080 port your server is listening on just to make sure that the server is indeed listening on those ports.


Yes. I've gone one step furter. From another PC on the LAN I connect with http://192.168.0.100:90/drupal (or 8080).

It works fine using that IP from within the LAN. This also confirms that I'm using the correct LAN side IP. (You had, in your PM, asked me to make sure I had the correct IP using ipconfig.)


Sharley wrote:If so then IMHO the server settings are correct especially if you returned the httpd-xampp.conf file back to it's safe state as mentioned above.


That's the one thing I haven't done yet. I want to keep Apache open as much as possible while working on this issue.

At any rate, wouldn't I need "Allow from all" in httpd-xampp.conf in order to allow WAN side connections?

Thanks for your wonderful help!

BB

Re: Users can't see my site

PostPosted: 13. April 2011 10:52
by Sharley
At any rate, wouldn't I need "Allow from all" in httpd-xampp.conf in order to allow WAN side connections?
Absolutely not because that section in the conf file protects your server from attack from the Internet but it will allow access to your web site in the htdocs folder which is the server's DocumentRoot.

See and understand the folders that that section protects and you will see that they should not be accessible by all because they contain your secure passwords and the servers configuration files among other sensitive files and folders.

To allow from all will be the most dangerous setting change you can possibly make.



The analogy to your current situation is that I have just traveled half way round the word and I am now knocking on your door and I can see you are home but you will not let me in because you can't find the right key to open the door. :)

Try and unplug or bypass your router and connect direct to the Internet with your PC and then you should be able to see your web site.

Because I believe XAMPP is now working as it should I can no longer be of any help as your issue is not now XAMPP related.

Best wishes and good luck. :)

[SOLVED] Users can't see my site

PostPosted: 13. April 2011 13:10
by BobBarton
Hi Sharley,

Thanks for all your help, your incredible patients, and unselfish support for dummies like me!

OK, I've reverted httpd-xampp.conf back to it's original.

And I've found the problem!

You're right, it was not an XAMPP problem.

I had totally overlooked/forgotten the fact that I have an Ooma hub (VOIP device) in front of my router. Ooma, not the router was blocking inbound traffic. The solution was to put the router in Ooma's DMZ.

Everything seems to be working for now. Even with httpd-xampp.conf back to original.

Thanks again,

BB