Yeah! Apache documentation is rather important in this framework! But then
we do need to include references to documentation about, at least, other
proxies, web servers, applications servers...
What I'm trying to get is a picture about the information provided from
XWiki, from within XWiki, about this issue: how to manage URL construction
within XWiki environment. Of course, it will depend upon which software is
used to deploy each XWiki instance, but it will be always XWiki sites
acting as gateways to that original information.
As you know I'm not a developer, but I frequently face issues in the
interface between users, allow me to say advanced users, and developers. A
good understanding about what is expected to be possible to do by just
"fine tuning" XWiki configuration files without customizing the
configuration of web or applications server behind the scene will be of
great help! I think!
Thus, for shorter URLs I'll concentrate in Short XWiki URLs: as a XWiki
user, this is the entry point I found to solve my doubts about how to
customize/shorten XWiki URLs.
I'll report back ASAP!
Cheers!
Ricardo
On Tue, Dec 15, 2015 at 9:13 PM Paul Libbrecht <paul(a)hoplahup.net> wrote:
Well, no Apache documentation?
(e.g. mod_proxy? mod_rewrite?)
paul
[IDIS Technical Secretariat] Ricardo Rodríguez
<mailto:ricardo.rodriguez@idisantiago.es>
15 décembre 2015 12:33
Sorry for being late! I've had some hard time trying to understand the
whole thing... and I failed to do that! Please, read below...
On Fri, Dec 11, 2015 at 3:23 PM Paul Libbrecht <paul(a)hoplahup.net>
wrote:
This is getting more hairy,
First, I think that all redirects sent using http-status will be covered
by proxyPassReverse.
This is the first time I truly face the complex world of client-server
conversation to serve webpages! And, of course, I found a lot of nice
work
done in XWiki! prior to go ahead, I would like to
be sure I'm following
the
correct XWiki pages dealing with this issue. Here
a summary...
http://portal.idisantiago.es/xwiki/bin/view/XWikiDevelopment/URL/
Please, am I missing anything? I know that XWiki pages are a
collaborative
effort and that any of us can contribute to
improve them. I'm just trying
to establish a solid starting point before going ahead!
Thanks for any insight!
Ricardo
> Your next step is to fix any URL produced within the XWiki page.
> I thought proxyHost would help fixing that (that's part of server.xml,
> see
>
https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Proxy_Support )
> but I think XWiki doesn't use much of
getServerName. Might still be
> useful for mails or such (there, you need the host-name).
>
> For any request to /atriumkm/ you could add another proxy rule but this
> makes duplicates which is inelegant (the resource page would have two
> accessible URLs).
>
> I think that
> xwiki.webapppath=
> (not commented out, this will make the web-app be considered to be "/")
> in xwiki.cfg might be your friend. It's part of the shortURLs strand
> (which would be your next step?).
>
> Paul
>> ProxyPass /
http://localhost:8080/atriumkm/
>>
>>
>> It avoid the loop, but it fails to generate correct URLs: it generates
> URLs
>> that work fine if accessed directly using Tomcat, but Apache Web Server
>> fails. For example, accessing
http://isabel.idisantiago.es, the URL
>> generated...
>>
http://isabel.idisantiago.es/atriumkm/bin/Main/HomeMV2
>>
>> failed to serve the page correctly served when accessing Tomcat at
> 8080...
>>
http://isabel.idisantiago.es:8080/atriumkm/bin/Main/HomeMV2
>>
>> It's the tomcat doing the redirect right now (use firebug, go to net,
>>> activate persist, then show the headers: Apache-Coyote/1.1) so maybe
>>> that helps things.
>>>
>>> You might want to keep
>>> ProxyPassReverse /
http://localhost:8080/atriumkm/
>>> (this cares for redirects emitted by tomcat)
>>>
>>> But I am still fearing you'll get some bad links
>>>
>> It seems to me that this option only works for the main page: in fact,
in
>> our installation, it includes a
redirection...
>>
>> *****
>> {{velocity}}
>> $response.sendRedirect($xwiki.getURL('Main.HomeMV2'))
>> {{/velocity}}
>> *****
>> The URL generated by xwiki.getURL includes the "application part" and
>> failed to be served.
>>
>> An image from Firebug...
>>
>>
http://goo.gl/4D93fm
>>
>> I'm afraid that I'm not able to follow all your reasoning... Why do you
> say
>> "it's the tomcat doing the redirect right now"?
>>
>> I would like to rephrase my initial question. Perhaps this is
clearer...
>>
>> 1) It is possible to remove the "application part" of an XWiki URL
when
> the
>> application is not deployed at ROOT in Tomcat with Apache Web Server as
>> front-end?
>> 2) If yes, does the set-up be done in the Apache Web Server side,
Tomcat
>> side, XWiki side, or any combination of
these parts?
>>
>> I'm far from being able to digest the complexity of this landscape...
I'm
>> afraid!
>>
>> Any insight will be extremely welcome! Thanks!
>>
>>
>>> Paul
>>> _______________________________________________
>>> users mailing list
>>> users(a)xwiki.org
>>>
http://lists.xwiki.org/mailman/listinfo/users
>>>
>> _______________________________________________
>> users mailing list
>> users(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/users
>> Paul Libbrecht <mailto:paul@hoplahup.net>
>> 11 décembre 2015 12:26
>> Can you try:
>>
>> ProxyPass /
http://localhost:8080/atriumkm/
>>
>> ?
>> It's the tomcat doing the redirect right now (use firebug, go to net,
>> activate persist, then show the headers: Apache-Coyote/1.1) so maybe
>> that helps things.
>>
>> You might want to keep
>> ProxyPassReverse /
http://localhost:8080/atriumkm/
>> (this cares for redirects emitted by tomcat)
>>
>> But I am still fearing you'll get some bad links
>>
>> Paul
>> _______________________________________________
>> users mailing list
>> users(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/users
>> [IDIS Technical Secretariat] Ricardo Rodríguez
>> <mailto:ricardo.rodriguez@idisantiago.es>
>> 11 décembre 2015 12:11
>> Thanks Paul! Please, read below...
>>
>> On Thu, Dec 10, 2015 at 11:49 AM Paul Libbrecht <paul(a)hoplahup.net>
> wrote:
>>> Ricardo,
>>>
>>> are you unable to move the webapp to root?
>>>
>> Nope! I can move XWiki to ROOT in Tomcat by simply renaming the
> application
>> folder! But I've been asked to not to do that by respecting the current
>> application running as ROOT in the server where I'm deploying XWiki.
>>
>> Besides, I would like to run several XWiki instances in the same box.
In
>> fact, I'm already doing that, calling
each application by using the
>> "application part of the URL". Far simple, for example...
>>
>>
http://isabel.idisantiago.es:8080/xwiki
>>
http://isabel.idisantiago.es:8080/atriumkm
>>
>> I would like to set up a vhost for each instance that avoid the
>> "application part in the URL.
>>
>>
>>> The shortURLs experience thus far has been based on that.
>>>
>>> For your vhost, you "just" need to change:
>>>
>>> ProxyPass /atriumkm
http://localhost:8080/atriumkm
>>> to
>>> ProxyPass /
http://localhost:8080/atriumkm
>>>
>>>
>> I think I've already tried this. As following...
>>
>> *****
>> <VirtualHost *:80>
>> ServerAdmin ricardo.rodriguez(a)idisantiago.es
>> ServerName isabel.idisantiago.es
>>
>> # RedirectMatch permanent ^/$
>
http://isabel.idisantiago.es/atriumkm/
>> ProxyPass /
http://localhost:8080/atriumkm
>> ProxyPassReverse /
http://localhost:8080/atriumkm
>>
>> # ProxyPass /
http://localhost:8080
>> # ProxyPassReverse /
http://localhost:8080
>>
>> DocumentRoot /var/www/html
>>
>> # Logging
>> ErrorLog /var/log/apache2/isabel.idisantiago.es-error_log
>> CustomLog /var/log/apache2/isabel.idisantiago.es-access_log common
>> </VirtualHost>
>> *****
>>
>> And I get this error...
>>
>> *****
>> Too many redirects occurred trying to open "isabel.idisantiago.es//".
>> *****
>> This is the current configuration. You can see that error accessing...
>>
>>
http://isabel.idisantiago.es
>>
>> It is clear that my understanding about how URLs are constructed is
truly
>> poor! Any help will be welcome!
>>
>> Thanks!!!
>>
>>
>>
>>> but there will be links left produced by the web-app that will contain
>>> /atriumkm, I think.
>>>
>>> Paul
>>>
>>>> [IDIS Technical Secretariat] Ricardo Rodríguez
>>>> <mailto:ricardo.rodriguez@idisantiago.es>
>>>> 10 décembre 2015 11:36
>>>> Hi!
>>>>
>>>> I'm moving an old XWiki installation (XWiki Enterprise 2.4.30451) to
a
>>> new
>>>> box. It currently runs as root in a CentOS/Tomcat/MySQL box serving
> pages
>>>> at port 80. The destination is a Ubuntu/Apache Web Server/Tomcat
MySQL
>>>> where an Apache virtual host will
serve all controller and virtual
>>>> wikis. A
>>>> different application is already running as root in the destination.
>>>>
>>>> I do need to remove the application part of the URL from the pages
> served
>>>> by the new location. This is mainly due to lots of hardcoded URLs
I''m
>>> not
>>>> able to get rid of them now.
>>>>
>>>> This simple virtual host configuration works fine, but I'm not able
to
>>>> understand how could I remove the
"atriumkm", the application, part
of
>>> the
>>>> URL...
>>>>
>>>> <VirtualHost *:80>
>>>> ServerAdmin ricardo.rodriguez(a)idisantiago.es
>>>> ServerName isabel.idisantiago.es
>>>>
>>>> RedirectMatch permanent ^/$
http://isabel.idisantiago.es/atriumkm/
>>>>
>>>> ProxyPass /atriumkm
http://localhost:8080/atriumkm
>>>> ProxyPassReverse /atriumkm
http://localhost:8080/atriumkm
>>>>
>>>> DocumentRoot /var/www/html
>>>>
>>>> # Logging
>>>> ErrorLog /var/log/apache2/isabel.idisantiago.es-error_log
>>>> CustomLog /var/log/apache2/isabel.idisantiago.es-access_log common
>>>> </VirtualHost>
>>>>
>>>> I've found this thread that it seems to me deals with a similar
> issue...
>>>>
http://markmail.org/thread/u5hu7kw6rr2fcacx
>>>>
>>>> ... but I'm not able to understand how to get it working.
>>>>
>>>> Please, must I be able to do that by modifying the VirtualHost
>>>> configuration? Must I modify web.xml? Something related with
xwiki.cfg
>>>> parameters? There are a lot of
information playing around and
concepts
> I
>>>> don't understand well.
>>>>
>>>> Any help will be extremely welcome!
>>>>
>>>> Cheers!
>>>>
>>>> Ricardo
>>>> _______________________________________________
>>>> users mailing list
>>>> users(a)xwiki.org
>>>>
http://lists.xwiki.org/mailman/listinfo/users
>>> _______________________________________________
>>> users mailing list
>>> users(a)xwiki.org
>>>
http://lists.xwiki.org/mailman/listinfo/users
>>>
>> _______________________________________________
>> users mailing list
>> users(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/users
>> Paul Libbrecht <mailto:paul@hoplahup.net>
>> 10 décembre 2015 11:49
>> Ricardo,
>>
>> are you unable to move the webapp to root?
>> The shortURLs experience thus far has been based on that.
>>
>> For your vhost, you "just" need to change:
>>
>> ProxyPass /atriumkm
http://localhost:8080/atriumkm
>> to
>> ProxyPass /
http://localhost:8080/atriumkm
>>
>> but there will be links left produced by the web-app that will contain
>> /atriumkm, I think.
>>
>> Paul
>>
>>
>> _______________________________________________
>> users mailing list
>> users(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/users
>> [IDIS Technical Secretariat] Ricardo Rodríguez
>> <mailto:ricardo.rodriguez@idisantiago.es>
>> 10 décembre 2015 11:36
>> Hi!
>>
>> I'm moving an old XWiki installation (XWiki Enterprise 2.4.30451) to a
> new
>> box. It currently runs as root in a CentOS/Tomcat/MySQL box serving
pages
>> at port 80. The destination is a
Ubuntu/Apache Web Server/Tomcat MySQL
>> where an Apache virtual host will serve all controller and virtual
>> wikis. A
>> different application is already running as root in the destination.
>>
>> I do need to remove the application part of the URL from the pages
served
> by the
new location. This is mainly due to lots of hardcoded URLs I''m
> not
>> able to get rid of them now.
>>
>> This simple virtual host configuration works fine, but I'm not able to
>> understand how could I remove the "atriumkm", the application, part of
> the
>> URL...
>>
>> <VirtualHost *:80>
>> ServerAdmin ricardo.rodriguez(a)idisantiago.es
>> ServerName isabel.idisantiago.es
>>
>> RedirectMatch permanent ^/$
http://isabel.idisantiago.es/atriumkm/
>>
>> ProxyPass /atriumkm
http://localhost:8080/atriumkm
>> ProxyPassReverse /atriumkm
http://localhost:8080/atriumkm
>>
>> DocumentRoot /var/www/html
>>
>> # Logging
>> ErrorLog /var/log/apache2/isabel.idisantiago.es-error_log
>> CustomLog /var/log/apache2/isabel.idisantiago.es-access_log common
>> </VirtualHost>
>>
>> I've found this thread that it seems to me deals with a similar
issue...
>>
>>
http://markmail.org/thread/u5hu7kw6rr2fcacx
>>
>> ... but I'm not able to understand how to get it working.
>>
>> Please, must I be able to do that by modifying the VirtualHost
>> configuration? Must I modify web.xml? Something related with xwiki.cfg
>> parameters? There are a lot of information playing around and concepts
I
don't understand well.
Any help will be extremely welcome!
Cheers!
Ricardo
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
Paul Libbrecht <mailto:paul@hoplahup.net>
11 décembre 2015 15:23
This is getting more hairy,
First, I think that all redirects sent using http-status will be covered
by proxyPassReverse.
Your next step is to fix any URL produced within the XWiki page.
I thought proxyHost would help fixing that (that's part of server.xml,
see
https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Proxy_Support)
but I think XWiki doesn't use much of getServerName. Might still be
useful for mails or such (there, you need the host-name).
For any request to /atriumkm/ you could add another proxy rule but this
makes duplicates which is inelegant (the resource page would have two
accessible URLs).
I think that
xwiki.webapppath=
(not commented out, this will make the web-app be considered to be "/")
in xwiki.cfg might be your friend. It's part of the shortURLs strand
(which would be your next step?).
Paul
> ProxyPass /
http://localhost:8080/atriumkm/
>
>
> It avoid the loop, but it fails to generate correct URLs: it generates
URLs
that work
fine if accessed directly using Tomcat, but Apache Web Server
fails. For example, accessing
http://isabel.idisantiago.es, the URL
generated...
>
http://isabel.idisantiago.es/atriumkm/bin/Main/HomeMV2
>
> failed to serve the page correctly served when accessing Tomcat at
8080...
>
>
http://isabel.idisantiago.es:8080/atriumkm/bin/Main/HomeMV2
>
> It's the tomcat doing the redirect right now (use firebug, go to net,
>> activate persist, then show the headers: Apache-Coyote/1.1) so maybe
>> that helps things.
>>
>> You might want to keep
>> ProxyPassReverse /
http://localhost:8080/atriumkm/
>> (this cares for redirects emitted by tomcat)
>>
>> But I am still fearing you'll get some bad links
>>
> It seems to me that this option only works for the main page: in fact,
in
> our installation, it includes a
redirection...
>
> *****
> {{velocity}}
> $response.sendRedirect($xwiki.getURL('Main.HomeMV2'))
> {{/velocity}}
> *****
> The URL generated by xwiki.getURL includes the "application part" and
> failed to be served.
>
> An image from Firebug...
>
>
http://goo.gl/4D93fm
>
> I'm afraid that I'm not able to follow all your reasoning... Why do you
say
> "it's the tomcat doing the redirect
right now"?
>
> I would like to rephrase my initial question. Perhaps this is clearer...
>
> 1) It is possible to remove the "application part" of an XWiki URL when
the
> application is not deployed at ROOT in Tomcat
with Apache Web Server as
> front-end?
> 2) If yes, does the set-up be done in the Apache Web Server side, Tomcat
> side, XWiki side, or any combination of these parts?
>
> I'm far from being able to digest the complexity of this landscape...
I'm
> afraid!
>
> Any insight will be extremely welcome! Thanks!
>
>
>> Paul
>> _______________________________________________
>> users mailing list
>> users(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> users(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/users
> Paul Libbrecht <mailto:paul@hoplahup.net>
> 11 décembre 2015 12:26
> Can you try:
>
> ProxyPass /
http://localhost:8080/atriumkm/
>
> ?
> It's the tomcat doing the redirect right now (use firebug, go to net,
> activate persist, then show the headers: Apache-Coyote/1.1) so maybe
> that helps things.
>
> You might want to keep
> ProxyPassReverse /
http://localhost:8080/atriumkm/
> (this cares for redirects emitted by tomcat)
>
> But I am still fearing you'll get some bad links
>
> Paul
> _______________________________________________
> users mailing list
> users(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/users
> [IDIS Technical Secretariat] Ricardo Rodríguez
> <mailto:ricardo.rodriguez@idisantiago.es>
> 11 décembre 2015 12:11
> Thanks Paul! Please, read below...
>
> On Thu, Dec 10, 2015 at 11:49 AM Paul Libbrecht <paul(a)hoplahup.net>
wrote:
>
>> Ricardo,
>>
>> are you unable to move the webapp to root?
>>
> Nope! I can move XWiki to ROOT in Tomcat by simply renaming the
application
> folder! But I've been asked to not to do
that by respecting the current
> application running as ROOT in the server where I'm deploying XWiki.
>
> Besides, I would like to run several XWiki instances in the same box. In
> fact, I'm already doing that, calling each application by using the
> "application part of the URL". Far simple, for example...
>
>
http://isabel.idisantiago.es:8080/xwiki
>
http://isabel.idisantiago.es:8080/atriumkm
>
> I would like to set up a vhost for each instance that avoid the
> "application part in the URL.
>
>
>> The shortURLs experience thus far has been based on that.
>>
>> For your vhost, you "just" need to change:
>>
>> ProxyPass /atriumkm
http://localhost:8080/atriumkm
>> to
>> ProxyPass /
http://localhost:8080/atriumkm
>>
>>
> I think I've already tried this. As following...
>
> *****
> <VirtualHost *:80>
> ServerAdmin ricardo.rodriguez(a)idisantiago.es
> ServerName isabel.idisantiago.es
>
> # RedirectMatch permanent ^/$
http://isabel.idisantiago.es/atriumkm/
>
> ProxyPass /
http://localhost:8080/atriumkm
> ProxyPassReverse /
http://localhost:8080/atriumkm
>
> # ProxyPass /
http://localhost:8080
> # ProxyPassReverse /
http://localhost:8080
>
> DocumentRoot /var/www/html
>
> # Logging
> ErrorLog /var/log/apache2/isabel.idisantiago.es-error_log
> CustomLog /var/log/apache2/isabel.idisantiago.es-access_log common
> </VirtualHost>
> *****
>
> And I get this error...
>
> *****
> Too many redirects occurred trying to open "isabel.idisantiago.es//".
> *****
> This is the current configuration. You can see that error accessing...
>
>
http://isabel.idisantiago.es
>
> It is clear that my understanding about how URLs are constructed is
truly
> poor! Any help will be welcome!
>
> Thanks!!!
>
>
>
>> but there will be links left produced by the web-app that will contain
>> /atriumkm, I think.
>>
>> Paul
>>
>>> [IDIS Technical Secretariat] Ricardo Rodríguez
>>> <mailto:ricardo.rodriguez@idisantiago.es>
>>> 10 décembre 2015 11:36
>>> Hi!
>>>
>>> I'm moving an old XWiki installation (XWiki Enterprise 2.4.30451) to a
>> new
>>> box. It currently runs as root in a CentOS/Tomcat/MySQL box serving
pages
>>> at port 80. The destination is a
Ubuntu/Apache Web Server/Tomcat MySQL
>>> where an Apache virtual host will serve all controller and virtual
>>> wikis. A
>>> different application is already running as root in the destination.
>>>
>>> I do need to remove the application part of the URL from the pages
served
>>> by the new location. This is mainly
due to lots of hardcoded URLs I''m
>> not
>>> able to get rid of them now.
>>>
>>> This simple virtual host configuration works fine, but I'm not able to
>>> understand how could I remove the "atriumkm", the application, part
of
>> the
>>> URL...
>>>
>>> <VirtualHost *:80>
>>> ServerAdmin ricardo.rodriguez(a)idisantiago.es
>>> ServerName isabel.idisantiago.es
>>>
>>> RedirectMatch permanent ^/$
http://isabel.idisantiago.es/atriumkm/
>>>
>>> ProxyPass /atriumkm
http://localhost:8080/atriumkm
>>> ProxyPassReverse /atriumkm
http://localhost:8080/atriumkm
>>>
>>> DocumentRoot /var/www/html
>>>
>>> # Logging
>>> ErrorLog /var/log/apache2/isabel.idisantiago.es-error_log
>>> CustomLog /var/log/apache2/isabel.idisantiago.es-access_log common
>>> </VirtualHost>
>>>
>>> I've found this thread that it seems to me deals with a similar
issue...
>>>
>>>
http://markmail.org/thread/u5hu7kw6rr2fcacx
>>>
>>> ... but I'm not able to understand how to get it working.
>>>
>>> Please, must I be able to do that by modifying the VirtualHost
>>> configuration? Must I modify web.xml? Something related with xwiki.cfg
>>> parameters? There are a lot of information playing around and
concepts
I
>>> don't understand well.
>>>
>>> Any help will be extremely welcome!
>>>
>>> Cheers!
>>>
>>> Ricardo
>>> _______________________________________________
>>> users mailing list
>>> users(a)xwiki.org
>>>
http://lists.xwiki.org/mailman/listinfo/users
>> _______________________________________________
>> users mailing list
>> users(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> users(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/users
> Paul Libbrecht <mailto:paul@hoplahup.net>
> 10 décembre 2015 11:49
> Ricardo,
>
> are you unable to move the webapp to root?
> The shortURLs experience thus far has been based on that.
>
> For your vhost, you "just" need to change:
>
> ProxyPass /atriumkm
http://localhost:8080/atriumkm
> to
> ProxyPass /
http://localhost:8080/atriumkm
>
> but there will be links left produced by the web-app that will contain
> /atriumkm, I think.
>
> Paul
>
>
> _______________________________________________
> users mailing list
> users(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/users
> [IDIS Technical Secretariat] Ricardo Rodríguez
> <mailto:ricardo.rodriguez@idisantiago.es>
> 10 décembre 2015 11:36
> Hi!
>
> I'm moving an old XWiki installation (XWiki Enterprise 2.4.30451) to a
new
> box. It currently runs as root in a
CentOS/Tomcat/MySQL box serving
pages
> at port 80. The destination is a
Ubuntu/Apache Web Server/Tomcat MySQL
> where an Apache virtual host will serve all controller and virtual
> wikis. A
> different application is already running as root in the destination.
>
> I do need to remove the application part of the URL from the pages
served
> by the new location. This is mainly due to
lots of hardcoded URLs I''m
not
> able to get rid of them now.
>
> This simple virtual host configuration works fine, but I'm not able to
> understand how could I remove the "atriumkm", the application, part of
the
URL...
<VirtualHost *:80>
ServerAdmin ricardo.rodriguez(a)idisantiago.es
ServerName isabel.idisantiago.es
RedirectMatch permanent ^/$
http://isabel.idisantiago.es/atriumkm/
ProxyPass /atriumkm
http://localhost:8080/atriumkm
ProxyPassReverse /atriumkm
http://localhost:8080/atriumkm
DocumentRoot /var/www/html
# Logging
ErrorLog /var/log/apache2/isabel.idisantiago.es-error_log
CustomLog /var/log/apache2/isabel.idisantiago.es-access_log common
</VirtualHost>
I've found this thread that it seems to me deals with a similar issue...
http://markmail.org/thread/u5hu7kw6rr2fcacx
... but I'm not able to understand how to get it working.
Please, must I be able to do that by modifying the VirtualHost
configuration? Must I modify web.xml? Something related with xwiki.cfg
parameters? There are a lot of information playing around and concepts I
don't understand well.
Any help will be extremely welcome!
Cheers!
Ricardo
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
[IDIS Technical Secretariat] Ricardo Rodríguez
<mailto:ricardo.rodriguez@idisantiago.es>
11 décembre 2015 13:16
Thanks! Please, read below!
On Fri, Dec 11, 2015 at 12:26 PM Paul Libbrecht <paul(a)hoplahup.net>
wrote:
It avoid the loop, but it fails to generate correct URLs: it generates
URLs
that work fine if accessed directly using Tomcat,
but Apache Web Server
fails. For example, accessing
http://isabel.idisantiago.es, the URL
generated...
http://isabel.idisantiago.es/atriumkm/bin/Main/HomeMV2
failed to serve the page correctly served when accessing Tomcat at
8080...
http://isabel.idisantiago.es:8080/atriumkm/bin/Main/HomeMV2
It's the tomcat doing the redirect right now (use firebug, go to net,
activate persist, then show the headers:
Apache-Coyote/1.1) so maybe
that helps things.
You might want to keep
ProxyPassReverse /
http://localhost:8080/atriumkm/
(this cares for redirects emitted by tomcat)
But I am still fearing you'll get some bad links
It seems to me that this option only works for the main page: in fact, in
our installation, it includes a redirection...
*****
{{velocity}}
$response.sendRedirect($xwiki.getURL('Main.HomeMV2'))
{{/velocity}}
*****
The URL generated by xwiki.getURL includes the "application part" and
failed to be served.
An image from Firebug...
http://goo.gl/4D93fm
I'm afraid that I'm not able to follow all your reasoning... Why do you
say
"it's the tomcat doing the redirect
right now"?
I would like to rephrase my initial question. Perhaps this is clearer...
1) It is possible to remove the "application part" of an XWiki URL when
the
application is not deployed at ROOT in Tomcat
with Apache Web Server as
front-end?
2) If yes, does the set-up be done in the Apache Web Server side, Tomcat
side, XWiki side, or any combination of these parts?
I'm far from being able to digest the complexity of this landscape... I'm
afraid!
Any insight will be extremely welcome! Thanks!
Paul
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
Paul Libbrecht <mailto:paul@hoplahup.net>
11 décembre 2015 12:26
Can you try:
ProxyPass /
http://localhost:8080/atriumkm/
?
It's the tomcat doing the redirect right now (use firebug, go to net,
activate persist, then show the headers: Apache-Coyote/1.1) so maybe
that helps things.
You might want to keep
ProxyPassReverse /
http://localhost:8080/atriumkm/
(this cares for redirects emitted by tomcat)
But I am still fearing you'll get some bad links
Paul
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
[IDIS Technical Secretariat] Ricardo Rodríguez
<mailto:ricardo.rodriguez@idisantiago.es>
11 décembre 2015 12:11
Thanks Paul! Please, read below...
On Thu, Dec 10, 2015 at 11:49 AM Paul Libbrecht <paul(a)hoplahup.net>
wrote:
Ricardo,
are you unable to move the webapp to root?
Nope! I can move XWiki to ROOT in Tomcat by simply renaming the
application
folder! But I've been asked to not to do that
by respecting the current
application running as ROOT in the server where I'm deploying XWiki.
Besides, I would like to run several XWiki instances in the same box. In
fact, I'm already doing that, calling each application by using the
"application part of the URL". Far simple, for example...
http://isabel.idisantiago.es:8080/xwiki
http://isabel.idisantiago.es:8080/atriumkm
I would like to set up a vhost for each instance that avoid the
"application part in the URL.
The shortURLs experience thus far has been based
on that.
For your vhost, you "just" need to change:
ProxyPass /atriumkm
http://localhost:8080/atriumkm
to
ProxyPass /
http://localhost:8080/atriumkm
I think I've already tried this. As following...
*****
<VirtualHost *:80>
ServerAdmin ricardo.rodriguez(a)idisantiago.es
ServerName isabel.idisantiago.es
# RedirectMatch permanent ^/$
http://isabel.idisantiago.es/atriumkm/
ProxyPass /
http://localhost:8080/atriumkm
ProxyPassReverse /
http://localhost:8080/atriumkm
# ProxyPass /
http://localhost:8080
# ProxyPassReverse /
http://localhost:8080
DocumentRoot /var/www/html
# Logging
ErrorLog /var/log/apache2/isabel.idisantiago.es-error_log
CustomLog /var/log/apache2/isabel.idisantiago.es-access_log common
</VirtualHost>
*****
And I get this error...
*****
Too many redirects occurred trying to open "isabel.idisantiago.es//".
*****
This is the current configuration. You can see that error accessing...
http://isabel.idisantiago.es
It is clear that my understanding about how URLs are constructed is truly
poor! Any help will be welcome!
Thanks!!!
> but there will be links left produced by the web-app that will contain
> /atriumkm, I think.
>
> Paul
>
>> [IDIS Technical Secretariat] Ricardo Rodríguez
>> <mailto:ricardo.rodriguez@idisantiago.es>
>> 10 décembre 2015 11:36
>> Hi!
>>
>> I'm moving an old XWiki installation (XWiki Enterprise 2.4.30451) to a
> new
>> box. It currently runs as root in a CentOS/Tomcat/MySQL box serving
pages
>> at port 80. The destination is a
Ubuntu/Apache Web Server/Tomcat MySQL
>> where an Apache virtual host will serve all controller and virtual
>> wikis. A
>> different application is already running as root in the destination.
>>
>> I do need to remove the application part of the URL from the pages
served
> by the
new location. This is mainly due to lots of hardcoded URLs I''m
> not
>> able to get rid of them now.
>>
>> This simple virtual host configuration works fine, but I'm not able to
>> understand how could I remove the "atriumkm", the application, part of
> the
>> URL...
>>
>> <VirtualHost *:80>
>> ServerAdmin ricardo.rodriguez(a)idisantiago.es
>> ServerName isabel.idisantiago.es
>>
>> RedirectMatch permanent ^/$
http://isabel.idisantiago.es/atriumkm/
>>
>> ProxyPass /atriumkm
http://localhost:8080/atriumkm
>> ProxyPassReverse /atriumkm
http://localhost:8080/atriumkm
>>
>> DocumentRoot /var/www/html
>>
>> # Logging
>> ErrorLog /var/log/apache2/isabel.idisantiago.es-error_log
>> CustomLog /var/log/apache2/isabel.idisantiago.es-access_log common
>> </VirtualHost>
>>
>> I've found this thread that it seems to me deals with a similar
issue...
>>
>>
http://markmail.org/thread/u5hu7kw6rr2fcacx
>>
>> ... but I'm not able to understand how to get it working.
>>
>> Please, must I be able to do that by modifying the VirtualHost
>> configuration? Must I modify web.xml? Something related with xwiki.cfg
>> parameters? There are a lot of information playing around and concepts
I
don't understand well.
Any help will be extremely welcome!
Cheers!
Ricardo
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users