Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian WebServer - [SOLVED]

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
User avatar
ralph.ronnquist
Posts: 342
Joined: 2015-12-19 01:07
Location: Melbourne, Australia
Been thanked: 6 times

Re: Debian WebServer

#21 Post by ralph.ronnquist »

Router won't allow me to map one port to a different one - it only allows me to forward from one port number to the same port number on a downstream box
Ok. How about brutely forcely... disconnect the server from the network, then attempt accessing it via remote IP from another, connected host.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: Debian WebServer

#22 Post by dilberts_left_nut »

Polybus wrote:What do you mean by that?

At the moment - I have a clean install of Debian 8 and a clean install of apache2 - I still get the error just trying to see the default Apache Web Page.

How can my site have anything to do with that?

Polybus
Discounting anything funky on your client, the only way you will get a redirected url from the server is if you set it to do so, and you weren't clear about whether you had added your site to your "clean install".
Given the scant available data, my next guess is that you aren't actually connecting to the server that you think you are - check your server logs.
AdrianTM wrote:There's no hacker in my grandma...

Polybus
Posts: 13
Joined: 2016-01-22 01:11

Re: Debian WebServer

#23 Post by Polybus »

Here are my server logs:

Code: Select all

root@spider:/var/log/apache2# cat access.log
192.168.0.8 - - [26/Jan/2016:13:03:12 +1100] "GET / HTTP/1.1" 200 3417 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
192.168.0.8 - - [26/Jan/2016:13:03:12 +1100] "GET /icons/openlogo-75.png HTTP/1.1" 200 6040 "http://192.168.0.3/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
192.168.0.8 - - [26/Jan/2016:17:51:52 +1100] "GET / HTTP/1.1" 200 3417 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:36 +1100] "GET /UI HTTP/1.1" 404 497 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:40 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:41 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:41 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:42 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:42 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:43 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:43 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:43 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
192.168.0.8 - - [26/Jan/2016:18:22:52 +1100] "GET / HTTP/1.1" 200 3417 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
129.253.x.xx - - [26/Jan/2016:18:25:31 +1100] "GET /api/1.0/rest/port_test?format=xml HTTP/1.1" 404 517 "-" "Java/1.6.0_18"
129.253.x.xx - - [26/Jan/2016:18:25:38 +1100] "GET /api/1.0/rest/port_test?format=xml HTTP/1.1" 404 517 "-" "Java/1.6.0_18"
129.253.x.xx - - [26/Jan/2016:18:25:45 +1100] "GET /api/1.0/rest/port_test?format=xml HTTP/1.1" 404 517 "-" "Java/1.6.0_18"
The last three lines I am assuming are from someone on this forum who was kind enough to test my system - I have blanked out the IP address - for their benefit


Here is the error log:

Code: Select all

root@spider:/var/log/apache2# cat error.log
[Tue Jan 26 13:01:59.362782 2016] [mpm_event:notice] [pid 32470:tid 3073480512] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Tue Jan 26 13:01:59.362900 2016] [core:notice] [pid 32470:tid 3073480512] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jan 26 18:15:08.661764 2016] [mpm_event:notice] [pid 32470:tid 3073480512] AH00491: caught SIGTERM, shutting down
[Tue Jan 26 18:15:09.737737 2016] [mpm_event:notice] [pid 4438:tid 3073922880] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Tue Jan 26 18:15:09.737832 2016] [core:notice] [pid 4438:tid 3073922880] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jan 26 18:21:11.246360 2016] [mpm_event:notice] [pid 4438:tid 3073922880] AH00491: caught SIGTERM, shutting down
[Tue Jan 26 18:21:12.323477 2016] [mpm_event:notice] [pid 4630:tid 3074414400] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Tue Jan 26 18:21:12.323587 2016] [core:notice] [pid 4630:tid 3074414400] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jan 26 18:22:37.101236 2016] [mpm_event:notice] [pid 4630:tid 3074414400] AH00491: caught SIGTERM, shutting down
[Tue Jan 26 18:22:38.175511 2016] [mpm_event:notice] [pid 4766:tid 3074041664] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Tue Jan 26 18:22:38.175608 2016] [core:notice] [pid 4766:tid 3074041664] AH00094: Command line: '/usr/sbin/apache2'

I'm not sure they help me....

Polybus

User avatar
ralph.ronnquist
Posts: 342
Joined: 2015-12-19 01:07
Location: Melbourne, Australia
Been thanked: 6 times

Re: Debian WebServer

#24 Post by ralph.ronnquist »

"GET /api/1.0/rest/port_test?format=xml HTTP/1.1"
Well, as far as I can work out, that's rather a "channel test" by a virtual server hosting service, and not something from a forum member.

However, as I re-read this thread, I saw you'd already tried changing the port to 8080, and at that time reached your server, which then responded by a directory listing due to being badly configured (for the second virtual host).

Thus, you have two issues:
1. on the one hand, network traffic to MyShed.hiddencorner.org:80 goes elsewhere (not to your server), and
2. your server (at port 8080) is badly configured for offering two virtual services.

The first is something you'll need to discuss with your ISP.
The second is something you'll need to learn/figure out via Apache forums.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: Debian WebServer

#25 Post by dilberts_left_nut »

Ok, so you are connecting to your server ...

This is you connecting from your LAN client and seems normal.
Polybus wrote:

Code: Select all

192.168.0.8 - - [26/Jan/2016:13:03:12 +1100] "GET / HTTP/1.1" 200 3417 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
192.168.0.8 - - [26/Jan/2016:13:03:12 +1100] "GET /icons/openlogo-75.png HTTP/1.1" 200 6040 "http://192.168.0.3/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
192.168.0.8 - - [26/Jan/2016:17:51:52 +1100] "GET / HTTP/1.1" 200 3417 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
This isn't:

Code: Select all

121.209.249.88 - - [26/Jan/2016:18:21:36 +1100] "GET /UI HTTP/1.1" 404 497 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:40 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
121.209.249.88 - - [26/Jan/2016:18:21:41 +1100] "GET /UI HTTP/1.1" 404 496 "http://121.209.249.88/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
It appears to be the same browser (what?) but coming from your own public IP - why?
Are you using that from inside your LAN?
Maybe your browser has cached the url from a previous connection to your router control panel (at the same address)?
dilberts_left_nut wrote:Discounting anything funky on your client
Looks like this now.
AdrianTM wrote:There's no hacker in my grandma...

Polybus
Posts: 13
Joined: 2016-01-22 01:11

Re: Debian WebServer

#26 Post by Polybus »

I am doing all my testing from a Windows 10 box - running something called Edge - which I guess is new Microsoft Speak for Internet Explorer.

When I enter the IP address 192.168.0.3 - I do it from the Windows 10 box

When I enter 121.209.249.88 - I also do it from the same Windows 10 box - although I have tried it from my phone as well - and a couple of the guys on here have tried to get to it from their computers - none of which have had any luck.

The Windows 10 box is also inside my home network - Is that a valid test - using my external IP address from inside my network??

Just another thing that may help anyone thinking about this - when everyone is saying my commands are going to a different server - I am running a Dynamic DNS system via https://freedns.afraid.org/ - maybe this is why things look like they are going to a different server - not sure if/how it will affect things - but just thought I'd make it clear in case it helps anyone's thinking.

Given that I have been doing most of my testing with IP addresses, I can't think that my Afraid DNS is having much affect on things.


Polybus

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: Debian WebServer

#27 Post by dilberts_left_nut »

Polybus wrote:I am doing all my testing from a Windows 10 box - running something called Edge - which I guess is new Microsoft Speak for Internet Explorer.
Well, I might suggest using a proper browser (and a proper OS :D)

When I enter 121.209.249.88 - I also do it from the same Windows 10 box - although I have tried it from my phone as well - and a couple of the guys on here have tried to get to it from their computers - none of which have had any luck.

The Windows 10 box is also inside my home network - Is that a valid test - using my external IP address from inside my network??
Your router is doing "NAT loopback" for LAN connections to the external interface, which "shouldn't" have an effect, but "something" is happening - I still suspect your client.

Just connect directly (use local DNS or the hosts file to use the correct domain names) and get your sites configured and working correctly.
Once you are satisfied, then look at making it available externally.
AdrianTM wrote:There's no hacker in my grandma...

Polybus
Posts: 13
Joined: 2016-01-22 01:11

Re: Debian WebServer

#28 Post by Polybus »

I think we've all cracked it!!!

I got into my Router and turned off UPnP - and I could get to the default Apache2 Web page both locally and externally!!

I then loaded up both my Websites and set up my VHosts in 000-default.conf

And it looks like they are up and running.

Although annoyingly - on my phone I get a new error saying

Code: Select all

Not Found
The requested URL /UI was not found on this server.
------------------------------------------------------------------
Apache/2.4.10 (Debian) Server at MyShed.hiddencorner.org Port 80
Can anybody out there access the sites?

MyShed.hiddencorner.org
Airgunner.homenet.org

Polybus
Last edited by Polybus on 2016-01-26 13:40, edited 2 times in total.

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Debian WebServer

#29 Post by kedaha »

Well-done!
I can access both sites.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

Polybus
Posts: 13
Joined: 2016-01-22 01:11

Re: Debian WebServer

#30 Post by Polybus »

Very happy!!!

Thanks for testing them for me :)

Wonder what UPnP was doing that caused it to not work.

Thanks so much for everyone who has provided some input - this really had me stumped!!!

IF anyone has issues trying to access those two sites please let me know - there are still some questions - as I mentioned above - my iPhone still wont load the sites as mentions /UI in the error message - but a completely different error message now - see above.

Polybus

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: Debian WebServer

#31 Post by dilberts_left_nut »

Polybus wrote:Wonder what UPnP was doing that caused it to not work.
Nothing - it's unrelated.
Likely the browser cache expired or something (maybe someone in Redmond ticked your "allow" box :lol: ).
AdrianTM wrote:There's no hacker in my grandma...

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Debian WebServer

#32 Post by dasein »

Confirmed: the site is accessible here too.

Do yourself a favor and back up your working Apache config. Right now. (As in, stop reading and start archiving.)
Polybus wrote:Wonder what UPnP was doing that caused it to not work.
https://en.wikipedia.org/wiki/Post_hoc_ergo_propter_hoc

geekosupremo
Posts: 154
Joined: 2014-10-30 23:17

Re: Debian WebServer

#33 Post by geekosupremo »

This is also good reminder that when checking web stuff either start a private or incognito window to see if the browser cache is interfering with things.

Polybus
Posts: 13
Joined: 2016-01-22 01:11

Re: Debian WebServer

#34 Post by Polybus »

(Config files backed up!!) :P

I'm not planning on contradicting anything from anyone - just want to understand why all this happened.

I accept that this may have been caused by something unrelated to UNPnP, but I've been playing with my router (Oh Oh!!!) and here are my results.

UNpnP off - all working
Switch it back on - No access
Switch it back off - all working
Switch On - No access
Switch off - all working

Anyway - can't say I am absolutely clear in my head what caused this particular issue but I can say I've learned a lot from you guys during the experience - and for that - a big thank you to each and every one of you :)

Polybus

User avatar
ralph.ronnquist
Posts: 342
Joined: 2015-12-19 01:07
Location: Melbourne, Australia
Been thanked: 6 times

Re: Debian WebServer

#35 Post by ralph.ronnquist »

Thanks; it's a bit of a gem to learn that some routers interfere badly in the port 80 traffic when their UPnP is on.
It's then comforting that the prevailing popular view on UPnP has it turned off.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Debian WebServer

#36 Post by dasein »

Polybus wrote:...here are my results.

UNpnP off - all working
Switch it back on - No access
Switch it back off - all working
Switch On - No access
Switch off - all working
Huh. Well, that's enough to convince me (assuming you did nothing else/made no other changes).

Properly implemented UPnP absolutely "shouldn't" affect this problem at all. But based on these results, there is clearly at least one router out there that missed that memo.

Very glad to hear that you got it sorted out. And a huge thanks for posting back your solution. Speaking of which, for the benefit of others who may have a similar problem in the future, would you please be so kind as to mark your thread as [SOLVED]? (Edit the subject line of your initial post.)

geekosupremo
Posts: 154
Joined: 2014-10-30 23:17

Re: Debian WebServer

#37 Post by geekosupremo »

Polybus wrote:(Config files backed up!!)
W00t!

Glad it's working for you! I second dasein
dasein wrote:huge thanks for posting back your solution

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: Debian WebServer

#38 Post by dilberts_left_nut »

Hmm...OK.
Probably disables the 'NAT loopback' feature (which is a nasty hack anyway) in order to enable UPnP (which should never be used either).
AdrianTM wrote:There's no hacker in my grandma...

Polybus
Posts: 13
Joined: 2016-01-22 01:11

Re: Debian WebServer

#39 Post by Polybus »

Just in case anyone is interested.

Router is:

NETGEAR - Cable Home Network Gateway
CG3100D - 2BPAUS


Issued by Telstra - largest ISP in Australia - for what it's worth - I know they do "something" to them - because they have restricted the Dynamic DNS feature in the router to only one company - who knows what else they play with before giving it to us.

Polybus

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Debian WebServer

#40 Post by dasein »

Polybus wrote:I'm not planning on contradicting anything from anyone...
Never be shy about being contrary when you have the facts on your side. (I do it all the time. :mrgreen:)

Seriously, as d_l_n points out, and I concur, if PnP is the culprit (and the empirical evidence is pretty compelling that it is), then it's an egregiously flawed implementation. Your perseverance is going to help anyone with similar hardware avoid the grief you've endured.

And as convinced as I was that this was a config problem, I'm happy to be wrong in service of finding a solution. With some routers, URLs apparently are spontaneously munged in transit. Totally bogus (and even deeply disturbing) behavior on the router's part, which is a big part of why this proved so hard to suss out. But everybody learned something. Win-win.

And thanks for posting the details of the offending hardware. That too will help others who encounter this problem.

(And +1 to the backup "w00t"!)

Post Reply