Project

General

Profile

Actions

Defect #2813

closed

wrong hostname for atom-links

Added by Anton Dollmaier over 15 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-02-23
Due date:
% Done:

100%

Estimated time:
Resolution:
Affected version:

Description

Hi,

Due to firewalling-issues I have redmine deployed on a machine which is only reachable via mod_proxy.

The hostnames are different, the mod_proxy-machine is reachable via "redmine.example.com", the real machine having redmine running via mongrel_cluster is connected via "redmine-int.example.com".

In the settings, I set the "hostname" to "redmine.example.com".

Using Redmine normally works great, except for RSS/Atom-links: Redmine does not use the "hostname"-setting for links to atom-pages, the link refs to "redmine-int.example.com":

<link href="http://redmine-int.example.com/projects/activity?format=atom&amp;key=MYATOMKEY" rel="alternate" title="ATOM" type="application/atom+xml" />

Changing the wrong hostname to the correct external hostname, the RSS/Atom is displayed correctly - only the link in the sourcecode is wrong.

In the view, the "auto_discovery_link_tag" is used, but I couldn't find the definition in the sourcecode (I don't code ruby).

Any help is appreciated.

additional information:

  • latest Redmine from 0.8-stable-Branch
  • Redmine-Machine: Debian Lenny with mongrel_cluster, installed via gem
  • Proxy: apache2.2 running on Mac
Actions #1

Updated by Jean-Philippe Lang over 15 years ago

Make sure you have this in your virtual host config:

ProxyPreserveHost On
Actions #2

Updated by Anton Dollmaier over 15 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

You're right, this solves the probleme.

But shouldn't the hostname-setting be in use, too?

This would be what I expect from a hostname-setting ...

Thanks!

Actions #3

Updated by Jean-Philippe Lang over 15 years ago

Actually, the hostname setting is only used to generate links in emails (which can be sent off-line and thus with no access to a 'host' of a request).
I'll add this to the FAQ.

Actions #4

Updated by Greg Burri over 15 years ago

In most cases the external hostname can't be preserved because the proxy access to a local address like localhost:8083 or 192.168.1.56.
Some documentation from Apache : http://httpd.apache.org/docs/2.0/mod/mod_proxy.html

Why the hostname setting can't be used for the atom stream ?

Actions #5

Updated by Anton Dollmaier over 15 years ago

Greg Burri wrote:

In most cases the external hostname can't be preserved because the proxy access to a local address like localhost:8083 or 192.168.1.56.

Actually, it works great:

You configure the proxy-vHost with the ProxyPreserveHost On-directive, proxypass to the internal address (localhost:8083 or else).

At this vhost you use ServerName redmine.external.domain or ServerAlias, redmine then works as expected.

Actions #6

Updated by Jean-Baptiste Barth over 14 years ago

  • Status changed from Resolved to Closed
Actions #7

Updated by staccatissimo Lee over 13 years ago

Dear All,

Where could I put on this tag? --> ProxyPreserveHost On

Actions

Also available in: Atom PDF