The issue:
I apologize if posting to the wrong place...
I am trying out a Flarum forum server.
The forum server is on the inside of a router, and my problem is that accessing the forum from
the local environment or from the outside internet works differently. From the inside everything
functions correctly, but from the external internet the forum GUI page never appears on the browser client,
only some few text-only lines containing the forum tags shows up.
My server is located inside a "safe" environment, protected by several routers.
This is how it looks:
Internet
|
| a.b.c.d (where a.b.c.d is my public ip address)
Router
| 192.168.10.1
|
|
| 192.168.10.155
Security Router
| 192.168.1.1
|
|
|-- Flarum server 192.168.1.112
|
|-- Local machine 192.168.1.113
|
Internal network
In the Flarum configuration config.php I have
'url' => 'http://192.168.1.112'
Flarum uses port 80.
From the local network (say 192.168.1.113) I can access the Forum server,
by 'http://192.168.1.112', all is fine.
However, from internet, I need to access differently. I cannot use port 80 as this is used internally for other purposes.
So I access by
'http://a.b.c.d:81'.
Therefore, in the outer router I NAT from port 80 to 81 and in the security router I allow port 81 to port 81.
This works fine in general and packets does flow as intended.
Replacing Flarum with a general http server, both internal and internet access works flawlessly.
However, with Flarum this is different. So what I see is a Flarum related issue.
Inspecting the HTTP packets received on the forum server from a local machine, I find:
GET / HTTP/1.1
Host: 192.168.1.112
but from an external client I find:
GET / HTTP/1.1
Host: a.b.c.d:81
So I guess my question is this:
What is the purpose behind Flarum caring about whether the GET request actually matches the 'url'
item in the config.php or not. Why this match requirement??? (given that this is the reason I observe what I
do, of course.)
Can this matching requirement be disabled somehow, or is this a bad idea??
I am just trying to wrap my head around this...
Thanks to anyone who can explain...