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

When deploying in non-ROOT context in Archival mode, ServerRelativeArchivalRedirect does not resolve URLs correctly #92

Closed
ldko opened this issue Feb 20, 2014 · 3 comments

Comments

@ldko
Copy link
Member

ldko commented Feb 20, 2014

I am running openwayback in Archival URL Replay Mode. I do not have openwayback deployed in the ROOT context.

I have this bean in my wayback.xml:

  <!--
    Last ditch attempt to resolve server-relative URLs (/page1.htm) that were 
    not successfully rewritten, resolving them against the referring URL to
    get them back on track.
  -->
  <bean name="+" class="org.archive.wayback.webapp.ServerRelativeArchivalRedirect">
    <property name="matchPort" value="8080" />
    <property name="useCollection" value="true" />
  </bean>

The issue seems to be that handleRequestWithCollection in ServerRelativeArchivalRedirect uses the first path segment to parse the collection name out of the referer. Because I am not deploying openwayback in the ROOT context, the collection name is not the first path segment. Instead the code seems to set the context path as the collection name which results in a failure to correctly resolve the URL.

Issue can be seen with: http://webarchive.library.unt.edu/unt/eotcd/20131004144902/http://research.library.unt.edu/eotcd/wiki/Main_Page

In the HTML is:

        <style type="text/css" media="screen, projection">/*<![CDATA[*/
            @import "/eotcd/w/skins/common/shared.css?303";
            @import "/eotcd/w/skins/thowikiskin/main.css?303";
        /*]]>*/</style>

Trying to resolve those CSS URLs results in an infinite loop.

@ulrichhave
Copy link

Hi Lauren, I updated the documentation. Maybe this section will be of help to you: https://github.com/iipc/openwayback/wiki/How-to-install#the-access-url-for-the-collection.

@ldko
Copy link
Member Author

ldko commented Jun 17, 2014

Using the documentation at https://github.com/iipc/openwayback/wiki/How-to-install, I went through several install scenarios with different outcomes.
Attempt 1:

  • Installed latest version of Oracle Java

  • Installed Tomcat 7.0.54

  • Got source code with: git clone https://github.com/iipc/openwayback.git

  • Changed directory to openwayback/wayback-webapp

  • ran mvn clean package

  • I started up Tomcat

  • I took the .war file from wayback-webapp/target and copied it to the Tomcat webapps directory for deployment but changed the name to archive.war. It was deployed.

  • I modified the wayback.xml according to the How-to-install documentation to have:

    wayback.basedir=/tmp/wayback wayback.urlprefix=http://localhost:8080/archive/wayback/

and to have:

- I restarted Tomcat and go to http://localhost:8080/archive/wayback/ as the documentation suggests, but I get a 404 page.

I go to http://localhost:8080/archive/ and get the message:
You seem to be accessing this OpenWayback via an incorrect URL. Please try one of the following AccessPoints:

archive

This is OpenWayback. Any URL in ARC files accessible to this sevice can be searched above.

  • I click on the access point named "archive" it lists, and it takes me to this access point where there is a broken logo image, and trying to search or click on Home or Help results in a redirect loop.
  • I am not sure why there is an access point called "archive"
  • Also of note, there is a typo in that message with "sevice"

Attempt 2:
I asked a programmer in my division who had never deployed Wayback to do so. His result in trying to configure Tomcat in a non-ROOT context was the same as mine (he deployed the WAR as owb.war).

Attempt 3:

Deployed in ROOT context using CDXCollection.xml, and it worked fine.

Attempt 4:

Attempt 5:


From: ulrichhave [notifications@github.com]
Sent: Tuesday, June 17, 2014 8:26 AM
To: iipc/openwayback
Cc: Ko, Lauren
Subject: Re: [openwayback] When deploying in non-ROOT context in Archival mode, ServerRelativeArchivalRedirect does not resolve URLs correctly (#92)

Hi Lauren, I updated the documentation. Maybe this section will be of help to you: https://github.com/iipc/openwayback/wiki/How-to-install#the-access-url-for-the-collection.


Reply to this email directly or view it on GitHubhttps://github.com//issues/92#issuecomment-46305920.

@ldko
Copy link
Member Author

ldko commented Jun 18, 2014

I am replacing this issue with #131 that you may or may not find to be more sensible.

@ldko ldko closed this as completed Jun 18, 2014
kngenie added a commit to kngenie/wayback that referenced this issue Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants