Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hosting behind a context #6196

Closed
bcantera opened this issue Aug 3, 2019 · 4 comments
Closed

Support hosting behind a context #6196

bcantera opened this issue Aug 3, 2019 · 4 comments
Labels

Comments

@bcantera
Copy link

bcantera commented Aug 3, 2019

As stated in https://community.containo.us/t/traefik-routing-issues/624/4, when GLPI is behind a context, content is not served in the correct way which causes to load invalid links. Reproduction case and more details on the issue is in the link with traefik.

@trasher trasher added the invalid label Aug 5, 2019
@trasher
Copy link
Contributor

trasher commented Aug 5, 2019

Informations requested in ticket template has not been provided.

@bcantera
Copy link
Author

bcantera commented Aug 5, 2019

Sorry, ticket template attached below:

Describe the bug
As stated in https://community.containo.us/t/traefik-routing-issues/624/4, when GLPI is behind a context, content is not served in the correct way which causes to load invalid links.

A clear and concise description of what the bug is.
The HTML generated by GLPI starts with /xxxx,
(example <script type="text/javascript" src="/lib/jquery/js/jquery.min.js?v=9.4.3"></script>),
which are assuming the webapp is always served under the root path of the website (aka. /).
GLPI is not built for supporting hosting behind a context by default.

Page(s) URL
https://github.com/glpi-project/glpi/issues/new?template=bug_report.md

If applicable, page(s) URL where the bug happens.

To reproduce

Steps to reproduce the behavior:
Deploy GLPI in a docker container behind a reverse proxy like traefik

Expected behavior
Content is served by GLPI pointing to / instead /path when using path redirection in the reverse proxy

A clear and concise description of what you expected to happen.
Load GLPI normally as it should be when served at /

Logs

paste logs here
Find them in *-error.log files under glpi/files/_log/

Screenshots

If applicable, add screenshots to help explain your problem.

Your GLPI setup (you can find it in Setup > General menu, System tab)

paste here

Additional context

Add any other context about the problem here.

@trasher trasher removed the invalid label Sep 13, 2019
@cedric-anne
Copy link
Member

Hi,

I often use GLPI hosting behind a context (i.e. http://my.domain/glpi/) and I did not face this issue. However, I never used GLPI behind a context AND a proxy, so I cannot says if it is a server configuration issue or a case that is not handled correctly by the application.

The "context" is computed by the method Config::detectRootDoc(). It may help you to debug. If you find a solution, feel free to open a pull request.

You can also ask for community support on forum or get a subscription for a professionnal support.

Regards

@github-actions
Copy link
Contributor

There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.

If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue.
If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants