View Issue Details

IDProjectCategoryView StatusLast Update
0013056mantisbtinstallationpublic2018-07-06 09:13
ReportersandorAssigned To 
PriorityhighSeverityblockReproducibilityalways
Status newResolutionopen 
PlatformMantis with reverse proxy ApacheOSOS Version
Product Version1.2.5 
Target VersionFixed in Version 
Summary0013056: Url are coding with static path instead of relative path
Description

These url are coding with a static path :
/login_page.php
/login.php
/browser_search_plugin.php
/login_cookie_test.php
/my_view_page.php
/css
/javascript
/images
It only works if there are in the root directory whereas there are supposed to be in the mantis directory.
It works if these files does not contain a "/" caracter at the beginning.

Steps To Reproduce

install mantis with a reverse proxy :

|reverse proxy| <=> |application server| <=> |database server|

Additional Information

To use mantis with a proxy and don't move files and folders, we rewrite some code in 3 files. But we are not totally sure if it is the best solution.

Mantis\config_inc.php
line 13
// modif proxy
$g_path = '';
$t_url = '';

Mantis\core\string_api.php
line 292
//return $t_path . '/' . $t_script . $t_query . $t_anchor;
// modif proxy
return $t_path . $t_script . $t_query . $t_anchor;

Mantis\core\helper_api.php
line 482
//return config_get_global( 'short_path' ) . $p_url;
// modif proxy
return $p_url;

TagsNo tags attached.

Relationships

related to 0009333 new Wrong protocol when using Apache mod_proxy as a reverse proxy to access a Mantis service. 

Activities

sandor

sandor

2011-07-08 10:52

reporter   ~0029136

Last edited: 2011-07-08 10:54

View 2 revisions

ProxyPass /mantis/ https://proxy/
ProxyPassReverse /mantis/ https://proxy/
for a total access of mantis with a proxy url must be rewrite with the /mantis/ path

resolution in config_defaults_inc.php, line 119 :

if ( isset( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) {
$t_path = '/mantis/';
}
$t_url = $t_protocol . '://' . $t_host . $t_path;

lbayle

lbayle

2013-05-20 11:36

reporter   ~0036907

related to 0009333 ?

g4uti3r

g4uti3r

2018-07-06 08:57

reporter   ~0060223

Hi, I saw this old issue and I have the exact same problem.

Setting the variables to "$g_path" "$t_url" to an empty string solves the issue of the proxy access, however it raises another issue regarding the email notifications.

E.g: here's what an account confirmation link sent via e-mail looks like: "verify.php?id=16&confirm_hash=uc0yto1gDYo3VB0GH7639MpNeOXAiBVraM0xAyMh8__O6eF-WsCVt7Py5KnqpKcs9SpNkXAPPP22nk9zuGk0".

Why isn't Mantis built on relative paths ?

Issue History

Date Modified Username Field Change
2011-06-07 03:51 sandor New Issue
2011-07-08 10:52 sandor Note Added: 0029136
2011-07-08 10:54 sandor Note Edited: 0029136 View Revisions
2013-05-20 11:36 lbayle Note Added: 0036907
2013-05-20 12:31 dregad Relationship added related to 0009333
2018-07-06 08:57 g4uti3r Note Added: 0060223