Project

General

Profile

Actions

Feature #14229

closed

Typo3 doesn't support Proxing like Zope for instance

Added by German Live almost 20 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2004-07-06
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

we were the greatest non-commercial water rescuing organization in the world ;-) and have over 2000 subsections (with 2000 teen subsections) in real.

We use our main "old" webserver for our central organization and all of our about 1700 online subsections.
In February we started with the Typo3 presentation with our central organisation and the first level subsections - 18 sections, because we must adopt typo3 first to handle such large groups of users and user groups with overviewable handling...

Our "old" Webserver has therefor a proxy rewrite to an hidden Typo3-server and give him all requests he couldn't handle himself..
This works for the main typo3 ok, because it uses the root page if the domain name not matches. But several plugins like the "tell-a-friend", "postcards" and much more couldn't handle their generated URL right.

So it would be great, if you can give an option to set the Typo3 hosts variables from SERVER_NAME and not only from HTTP_HOST. Thanks.
(upgrading to 3.6.1 is in work)

Reiner

  1. DEBUG SYSTEM INFORMATION - START ###
    HTTP_HOST : 10.0.0.4
    TYPO3_HOST_ONLY : 10.0.0.4
    TYPO3_PORT :
    PATH_INFO :
    QUERY_STRING : TYPO3_INSTALL[type]=phpinfo
    REQUEST_URI : /typo3/install/index.php?TYPO3_INSTALL[type]=phpinfo
    HTTP_REFERER : http://www.dlrg.de/typo3/install/index.php?TYPO3_INSTALL[type]=about
    TYPO3_REQUEST_HOST : http://10.0.0.4
    TYPO3_REQUEST_URL : http://10.0.0.4/typo3/install/index.php?TYPO3_INSTALL[type]=phpinfo
    TYPO3_REQUEST_SCRIPT: http://10.0.0.4/typo3/install/index.php
    TYPO3_REQUEST_DIR : http://10.0.0.4/typo3/install/
    TYPO3_SITE_URL : http://10.0.0.4/
    SCRIPT_NAME : /typo3/install/index.php
    TYPO3_DOCUMENT_ROOT : /var/www/typo3
    SCRIPT_FILENAME : /var/www/typo3/typo3/install/index.php
    REMOTE_ADDR : 10.0.0.2
    REMOTE_HOST :
    HTTP_USER_AGENT : Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7) Gecko/20040616
    HTTP_ACCEPT_LANGUAGE: de-de,en-us;q=0.7,en;q=0.3
    CONST: PHP_OS : Linux
    CONST: TYPO3_OS :
    CONST: PATH_thisScri: /var/www/typo3/typo3/install/index.php
    CONST: php_sapi_name: apache
    OTHER: TYPO3_VERSION: 3.6.0RC1
    OTHER: PHP_VERSION : 4.3.4
    imagecreatefromgif():
    imagecreatefrompng(): 1
    imagecreatefromjpeg(: 1
    imagegif() :
    imagepng() : 1
    imagejpeg() : 1
    imagettftext() : 1
    OTHER: IMAGE_TYPES : 14
    OTHER: memory_limit : 99M
    SERVER: SERVER_PORT : 80
    SERVER: SERVER_SOFTW: Apache/1.3.31 (Debian GNU/Linux) PHP/4.3.4 AuthMySQL/4.2.0 mod_ssl/2.8.18 OpenSSL/0.9.7d
    SERVER: GATEWAY_INTE: CGI/1.1
    SERVER: SCRIPT_NAME : /typo3/install/index.php
    SERVER: PATH_TRANSLA: /var/www/typo3/typo3/install/index.php
    T3CV_GFX: image_proc: 1
    T3CV_GFX: gdlib : 1
    T3CV_GFX: gdlib_png : 0
    T3CV_GFX: gdlib_2 : 1
    T3CV_GFX: im : 1
    T3CV_GFX: im_path : /usr/local/imagemagick-typo3-4.2.9/bin/
    T3CV_GFX: im_path_lz: /usr/local/imagemagick-typo3-4.2.9/bin/
    T3CV_GFX: im_version: 0
    T3CV_GFX: im_negate_: 0
    T3CV_GFX: im_imvMask: 0
    T3CV_GFX: im_combine: composite
  2. DEBUG SYSTEM INFORMATION - END ###

but:
SERVER_NAME www.dlrg.de
SERVER_PORT 80
(issue imported from #M202)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #15135: Typo3 backend does not work with reverse proxyClosedChristian Jul Jensen2005-10-20

Actions
Actions #1

Updated by German Live almost 20 years ago

mmh, sorry, wrong category... this bug should be "core" ...
found no way to change this like in bugzilla...

Reiner

Actions #2

Updated by Steffen Müller over 18 years ago

Whoo, this bug is quite old, but nevertheless, I am interested in the topic.
I can't understand the question 100%, what exactly is the difference between HTTP_HOST and SERVER_NAME?
How are they build in Apache / PHP?
Some docs (Redhat for example) say, both are the same, some say, they are not.

I am a bit confused.

Actions #3

Updated by German Live over 18 years ago

Hello,

first, since 2 weeks we have now consolidated our 2 servers, because our still non typo3 members need more hard disk space and the old one is over 5 years old (ah, and my written "greatest" was with the meaning "biggest" ;-)... )

And second, I hope this ist a clearer explanation...

client -> apache1 -> apache2

client:
Webbrowser who request for instance http://www.dlrg.de/Ueber_uns/

apache1
Frontend webserver who get the request (with HTTP_HOST=www.dlrg.de
and SERVER_NAME=www.dlrg.de) and therefore look after
+ <document root>/Ueber_uns/
but couldn't find the directory of this request...

Normally the apache should rewrite it to the local typo3 instance...
For bigger sites it could be interesting, to serve the request to a
second server (even for load balancing)
So apache1 send a request with a redirect/proxy rule to apache2.

apache2 (who is bound on the second server with IP 10.0.0.4)
Get the request for http://www.dlrg.de/Ueber_uns/ (with
HTTP_HOST=10.0.0.4 and SERVER_NAME=www.dlrg.de)
and therefore look after
+ <document root>/Ueber_uns/
but couldn't find the directory of this request...
This apache2 rewrite it to the local typo3 instance...

If apache2 need only one domain to feed, this could be ignored, but it
there were several domains to handle (set domain records in typo3)
it could'nt detect the original requested domain, because
TYPO3_HOST_ONLY was set to HTTP_HOST instead of
SERVER_NAME. So typo3 delivers the first root typo3 page...

We had the luck that only one domain had to be rewritten the explained
way and that it was the first typo3 page. Our other domains were bound
to another IP, which was handled directly by the apache2 server...

Reiner

Actions #4

Updated by Steffen Müller over 18 years ago

IMHO it is possible to rewrite the HTTP_HOST variable:
Read the mod_rewrite docs,
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteRule
Search for the substitution flag [env|E]

I don't know why TYPO3 uses HTTP_HOST instead of SERVER_NAME, but believe there's a reason for it. If the env-rewrite works for you, I will close the bug and mark it as no_change_required.

Still I am interested in how on what basis both ENV get build by PHP...

Actions #5

Updated by Martin Kutschker over 18 years ago

Using proxies seems to be installation dependent. I just stumbled across a setup with Squid where SERVER_NAME was the same as HOST_NAME, but HTTP_X_FORWARDED_HOST yielded the "correct" name. Incidentally was set HTTP_X_FORWARDED_SERVER too.

So perhaps changing t3lib_div::getIndpEnv() like this is a general solution:

case 'HTTP_HOST':
if ($TYPO3_VAR['SYS']['hostNameVar'] &&
($_SERVER[$TYPO3_VAR['SYS']['hostNameVar']]) {
return $_SERVER[$TYPO3_VAR['SYS']['hostNameVar']]
} else {
return $_SERVER[$getEnvName];
}

As admin you can set now the correct way for your setup (webserver/proxy) to determine the host name.

Actions #6

Updated by Axel Beckert over 18 years ago

Equal, if SERVER_NAME or HTTP_HOST is used: It won't work with alle reverse proxy setups.

For use with reverse proxies, there should be an option to configure a hardcoded value for use in TYPO3_HOST_ONLY, TYPO3_PORT and TYPO3_REQUEST_HOST instead of generating one based on HTTP_HOST. These three all take their values from $_SERVER[HTTP_HOST], while all other hostname containing values returned getIndpEnv results use one of these three values.

Our local problem with this issue, is that we always have a "frontend" Apache which serves static content or relays requests to dynamic content to the appropriate PHP or mod_perl "backend" Apache, which usually runs on a higher port. This port then leaks into the front end edit mode via TYPO3_STIE_URL, which is used in full URLs inclusive hostname and port number in JavaScript links.

This seems similar to Bug Id #15135: http://bugs.typo3.org/view.php?id=1699

Actions #7

Updated by Henning Pingel over 17 years ago

Hi,

I would like to help on solving the related bugs 169, 1699 and 202. Regarding the reverse proxy capabilities (including SSL) I have started to write a tutorial. The work on this tutorial is necessary for me to understand the problem in depth.

I hope it is also helpful for solving this issue and finding a solution that can be part of the core.

http://www.henningpingel.de/TYPO3-Backend-Via-SSL-Proxy.124.0.html

Best regards,
Henning

Actions #8

Updated by Christian Jul Jensen over 15 years ago

duplicate according to Christian Kuhn

Actions

Also available in: Atom PDF