At least in
Tested with this in
Then in
Under Apache (on a private IP) I get this:
Under LSWS it's like this:
RewriteCond
directives in a .htaccess
context, but probably elsewhere as well, this value contains the Listener Address setting. However, under Apache, it contains the actual IP address to which the connection was made, which seems like a clear incompatibility. All the code I've seen with SERVER_ADDR
expects it to be an IP address.Tested with this in
.htaccess
:
Apache config:
RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_ADDR} .+
RewriteRule ^dump\.php$ - [END,E=lsws_server_addr:%0]
dump.php
:
PHP:
<?php
header('Content-Type: text/plain');
var_dump($_SERVER['SERVER_ADDR'], $_SERVER['lsws_server_addr']);
Code:
string(9) "127.3.3.3"
string(9) "127.3.3.3"
Code:
string(14) "123.123.123.123"
string(5) "*:443"
Last edited: