Login missing if accessing via virtual directory (apache2 proxy) #216

Open
jgm opened this Issue Jul 9, 2011 · 7 comments

Projects

None yet

2 participants

@jgm
Owner
jgm commented Jul 9, 2011
What steps will reproduce the problem?
1. I'm using apache2 proxy to map localhost:5001 on http://myipaddress/wiki
as described in gitit user's guide (second method) in order to get wiki
access via the subnet of our hospital
 

What is the expected output? What do you see instead?
wiki accessed via htt://localhost:5001 shows Login/Logout,
abessend via http://myipaddress/wiki shows wiki pages without Login/Logout


What version of the product are you using? On what operating system?
Ubuntu 9.04, apache 2.2, gitit 0.6.5, ghc 6.10.4

Please provide any additional information below.
Login appears up when visiting new link

Google Code Info:
Issue #: 73
Author: p.herken...@uni-koeln.de
Created On: 2009-10-26T10:40:55.000Z
Closed On: 
@jgm jgm was assigned Jul 9, 2011
@jgm
Owner
jgm commented Jul 9, 2011

Thanks for the report.

Try this temporary workaround:

  1. copy getuser.st from ~/.cabal/shared/gitit-0.6.5/data/templates to the templates
    subdirectory of the directory from which you're running gitit

  2. Change the line:
    $.get("$base$/_user", {}, function(username, status) {
    to read
    $.get("http://localhost:5001/_user", {}, function(username, status) {

  3. Restart gitit

Let me know if that works for you. mod_proxy_html doesn't rewrite links in
javascripts, so this link needs to be changed manually. I should think of a better
way to handle this, or at least add to the documentation.

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2009-10-26T16:25:42.000Z

@jgm
Owner
jgm commented Jul 9, 2011

It does not work. the page pops up with status line error.
apache2 error.log:
Tue Oct 27 09:37:20 2009] [error] [client 134.95.33.91] File does not exist:
/var/www/css, referer: http://134.95.61.168/wiki/
[Tue Oct 27 09:38:52 2009] errorConnection refused: proxy: HTTP: attempt to
connect to 127.0.0.1:5001 (127.0.0.1) failed
I hope, it helps you.

btw: the proxy method of the User's Guide didn't work until I created an empty
directory 'wiki' in the Document Root. Should I create 'css' also?

Google Code Info:
Author: p.herken...@uni-koeln.de
Created On: 2009-10-27T09:00:21.000Z

@jgm
Owner
jgm commented Jul 9, 2011

Sorry, I made a mistake. The line should be:

$.get("http://myipaddress/wiki/_user", {}, function(username, status) {

Let me know how it goes with this. I'm not sure about the css issue. Does the page
look nicely styled? What do you see when you browse to
http://myipaddress/wiki/css/screen.css ?

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2009-10-27T14:47:22.000Z

@jgm
Owner
jgm commented Jul 9, 2011
  1. http://127.0.0.1:5001/_logout shows:
    Login / Get an account Logout <title>Happstack 0.3.3 File not
    found</title>

    Happstack 0.3.3

    Your file is not found
    To try
    again is useless
    It is just not here


    2.http://134.95.61.168/wiki/ shows no userbox
    3.pages are nicely formatted
    4.browsing to myipaddress/wiki/css/screen.css pops up an editor with screen.css (IE)

Google Code Info:
Author: p.herken...@uni-koeln.de
Created On: 2009-10-27T16:19:39.000Z

@jgm
Owner
jgm commented Jul 9, 2011

What do you see at

http://134.95.61.168/wiki/_login

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2009-10-27T16:41:16.000Z

@jgm
Owner
jgm commented Jul 9, 2011

with http://myipaddress/wiki in getuser.st
I saw at http://134.95.61.168/wiki/_login the Login page without the login box.
After inspecting apache2 error.log, i created a dummy css directory under Document
Root and now it works.
/var/www
/var/www/wiki
/var/www/css
/var/www/favicon.ico # complains in error.log about missing file
thanks

Google Code Info:
Author: p.herken...@uni-koeln.de
Created On: 2009-10-28T11:29:14.000Z

@daishi
daishi commented Mar 2, 2015

Hi, I think I have the same problem as was originally described in this issue. I believe that I've tried the suggestions listed here, with no luck. I can go to my server's .../_login page, but entering my credentials simply redirects back to the _login page. Would you recommend a next step for debugging?

I am using the Debian packaged version of gitit: 0.10.0.1-1+b1.

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