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

Deploying in non-ROOT context fails if not named "wayback" #160

Closed
ldko opened this issue Sep 12, 2014 · 6 comments
Closed

Deploying in non-ROOT context fails if not named "wayback" #160

ldko opened this issue Sep 12, 2014 · 6 comments

Comments

@ldko
Copy link
Member

ldko commented Sep 12, 2014

Trying to deploy in a non-ROOT context is only working for me (using documentation at https://github.com/iipc/openwayback/wiki/Deploying-OpenWayback-in-non-ROOT-Context) if I give mycontext as "wayback" (deploy the app as wayback.war). Otherwise, going to the default URL tells me to go to an accesspoint that has the same name as the context name I deployed as and querying is broken.

@anjackson
Copy link
Member

Seems like /wayback/ is hard-coded in a number of places in wayback.xml...

<bean name="standardaccesspoint" class="org.archive.wayback.webapp.AccessPoint">
<property name="accessPointPath" value="${wayback.url.prefix}/wayback/"/>

...

<property name="replayPrefix" value="${wayback.url.prefix}/wayback/" />
<property name="queryPrefix" value="${wayback.url.prefix}/wayback/" />
<property name="staticPrefix" value="${wayback.url.prefix}/wayback/" />
...

<property name="uriConverter">
<bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter">
<property name="replayURIPrefix" value="${wayback.url.prefix}/wayback/"/>
</bean>
</property>

These should probably be turned into a ${wayback.context} path variable, or similar.

@ldko
Copy link
Member Author

ldko commented Sep 12, 2014

I am not sure that is the whole issue.

The way I would think it should work using the default config with non-ROOT context, and how I read it noted in the doc, is that if you stick the context name onto wayback.url.prefix, then your configuration should work, with an access point of "wayback". For example, I am trying to deploy with lauren.war. I am setting the variable as:

wayback.url.prefix=${wayback.url.scheme}://${wayback.url.host}:${wayback.url.port}/lauren

and in theory, if I leave standardaccesspoint as is, I would access my collection at: http://localhost:8080/lauren/wayback/. But if I go there I get a 404. If I go to http://localhost:8080/lauren/, I get a message:

    You seem to be accessing this OpenWayback via an incorrect URL. Please try one of the following   

AccessPoints:

lauren

If I click on that, I get the search page with a broken icon, and if I try to search for something, there is a redirect loop.

If, however, I take that config and change the prefix variable to:

wayback.url.prefix=${wayback.url.scheme}://${wayback.url.host}:${wayback.url.port}/wayback

and move the OpenWayback app directory in Tomcat's webapps called "lauren" to be called "wayback" and restart Tomcat, then I can access the working app as expected at http://localhost:8080/wayback/wayback/, with no problem.

@anjackson
Copy link
Member

Ah, yes, you're quite right - please forgive my confusion. Can you try changing the accessPointPath to this?:

<property name="accessPointPath" value="${wayback.url.port}:wayback"/>

EDITED Should have been ${wayback.url.port} not ${wayback.port}

@ldko
Copy link
Member Author

ldko commented Sep 12, 2014

I don't think that exact change is working for me, but looking back at the mailing list threads, I found the working standardaccesspoint config that Ilya posted that I can get to work now. I will change the non-ROOT documentation page to add the additional changes needed on the default wayback.xml and close the ticket. Thank you, Andy.

-Lauren

@anjackson
Copy link
Member

Thanks Lauren - sorry I wasn't more helpful!

@ldko
Copy link
Member Author

ldko commented Sep 12, 2014

I have modified the documentation at https://github.com/iipc/openwayback/wiki/Deploying-OpenWayback-in-non-ROOT-Context, to configure a working non-ROOT deployment.

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