Archiva

Wrong repository url when archiva is used behind Apache with mof_proxy

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1.2
  • Component/s: repository interface
  • Labels:
    None
  • Number of attachments :
    1

Description

The repository url is http:localhost:8080/archiva/repository/repoName instead of http(s)://apache.host/archiva/repository/repoName

Activity

Hide
Wendy Smoak added a comment -

would this need the equivalent of Continuum's base url configuration? (or do we already have that and it's just not displaying?)

Show
Wendy Smoak added a comment - would this need the equivalent of Continuum's base url configuration? (or do we already have that and it's just not displaying?)
Hide
Emmanuel Venisse added a comment -

no, in continuum we need it because it is used outside web pages so we can't get the real url.
For archiva, we are on a page so we know the url used by the user so the host/port that we can use instead of ${baseUrl} used in the jsp

Show
Emmanuel Venisse added a comment - no, in continuum we need it because it is used outside web pages so we can't get the real url. For archiva, we are on a page so we know the url used by the user so the host/port that we can use instead of ${baseUrl} used in the jsp
Hide
Marc Lustig added a comment -

Well, we also have a ReverseProxy in front of Archiva/JBoss, and we have no such issues.
I suppose the ReverseProxy is badly configured.

Show
Marc Lustig added a comment - Well, we also have a ReverseProxy in front of Archiva/JBoss, and we have no such issues. I suppose the ReverseProxy is badly configured.
Hide
Emmanuel Venisse added a comment -

Marc,
Can I see your config?

Show
Emmanuel Venisse added a comment - Marc, Can I see your config?
Hide
Brett Porter added a comment -

here is a patch that would use the X-Forwarded-Host header if present. However, it's only available on Apache 2.0+ and there's a better solution in this case. You should add the following configuration directive instead:

ProxyPreserveHost on

Show
Brett Porter added a comment - here is a patch that would use the X-Forwarded-Host header if present. However, it's only available on Apache 2.0+ and there's a better solution in this case. You should add the following configuration directive instead: ProxyPreserveHost on
Hide
Brett Porter added a comment -

bumping this out to the future in case someone wants to make the host name configurables

Show
Brett Porter added a comment - bumping this out to the future in case someone wants to make the host name configurables
Hide
Brett Porter added a comment -

applied patch, will create a new issue for making the host explicitly configurable

Show
Brett Porter added a comment - applied patch, will create a new issue for making the host explicitly configurable

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: