View Issue Details

IDProjectCategoryView StatusLast Update
0013056mantisbtinstallationpublic2019-02-06 13:04
Reportersandor Assigned To 
Status newResolutionopen 
PlatformMantis with reverse proxy Apache 
Product Version1.2.5 
Summary0013056: Url are coding with static path instead of relative path

These url are coding with a static path :
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.

line 13
// modif proxy
$g_path = '';
$t_url = '';

line 292
//return $t_path . '/' . $t_script . $t_query . $t_anchor;
// modif proxy
return $t_path . $t_script . $t_query . $t_anchor;

line 482
//return config_get_global( 'short_path' ) . $p_url;
// modif proxy
return $p_url;

TagsNo tags attached.


related to 0009333 new Wrong protocol when using Apache mod_proxy as a reverse proxy to access a Mantis service. 
related to 0024860 new Refused to load the stylesheet '<URL>' 




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;



2013-05-20 11:36

reporter   ~0036907

related to 0009333 ?



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 ?



2019-02-06 12:30

reporter   ~0061422

Committed / pushed a change:

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
2019-02-06 12:30 sarodude Note Added: 0061422
2019-02-06 13:04 vboctor Relationship added related to 0024860