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

Problem with server.contextPath and grouped repositories -> The requested URL /contextname/summary/groupname/reponame.git was not found on this server. #405

Closed
gitblit opened this Issue Aug 12, 2015 · 3 comments

Comments

Projects
None yet
1 participant
@gitblit
Owner

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 109

What steps will reproduce the problem?

1.
in gitblit.properties set
server.contextPath = 
to something different then "/"
e.g.:
server.contextPath = /gitblit

2.
create a grouped repository
e.g:
myproj/myrepo

3.
push some data to it

4.
try to display the summary of the repo by clicking on it
in the gitblit webinterface.


What is the expected output? What do you see instead?
I would expect to view the history and branches etc.
instead i see an apache error page:

Not Found

The requested URL /gitblit/summary/myproj/myrepo.git was not found on this server.

Apache/2.2.16 (Debian) Server at marvin Port 443


What version of the product are you using? On what operating system?
gitblit 1.0.0
jdk 1.7.0.5
Debian GNU/Linux (squeeze)

Please provide any additional information below.
I'm using apache https and ajp

Everything works flawless with a ungrouped repository (group: main).

But the combination of server.contextPath and grouped repository results in this problem.

Reported by kosta.grails on 2012-07-16 13:29:08

@gitblit

This comment has been minimized.

Show comment
Hide comment
@gitblit

gitblit Aug 12, 2015

Owner
The problem is that Apache takes urls which should look like this:
http://localhost/gitblit/summary/myproj%2Fmyrepo.git

and "helps" us by re-encoding the url like this:
http://localhost/gitblit/summary/myproj/myrepo.git

This behavior breaks Wicket - the underlying web framework used by Gitblit.  I have
seen several Apache config options which indicate that they disable this behavior,
but I have not found any combination that actually works as described.

For now the solution is either:
1. Set web.mountParameters = false
2. Set web.forwardSlashCharacter = !

Reported by James.Moger on 2012-07-16 14:09:45

Owner

gitblit commented Aug 12, 2015

The problem is that Apache takes urls which should look like this:
http://localhost/gitblit/summary/myproj%2Fmyrepo.git

and "helps" us by re-encoding the url like this:
http://localhost/gitblit/summary/myproj/myrepo.git

This behavior breaks Wicket - the underlying web framework used by Gitblit.  I have
seen several Apache config options which indicate that they disable this behavior,
but I have not found any combination that actually works as described.

For now the solution is either:
1. Set web.mountParameters = false
2. Set web.forwardSlashCharacter = !

Reported by James.Moger on 2012-07-16 14:09:45

@gitblit

This comment has been minimized.

Show comment
Hide comment
@gitblit

gitblit Aug 12, 2015

Owner
Hi James,

thnx for your response.
web.forwardSlashCharacter = !
works does the trick. 

Sorry that I missed that before on the FAQ.

Reported by kosta.grails on 2012-07-16 14:30:02

Owner

gitblit commented Aug 12, 2015

Hi James,

thnx for your response.
web.forwardSlashCharacter = !
works does the trick. 

Sorry that I missed that before on the FAQ.

Reported by kosta.grails on 2012-07-16 14:30:02

@gitblit

This comment has been minimized.

Show comment
Hide comment
@gitblit

gitblit Aug 12, 2015

Owner
No problem.  Glad to hear it works!

Reported by James.Moger on 2012-07-16 14:49:55

  • Status changed: Done
Owner

gitblit commented Aug 12, 2015

No problem.  Glad to hear it works!

Reported by James.Moger on 2012-07-16 14:49:55

  • Status changed: Done

@gitblit gitblit closed this Aug 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment