Change contextpath from /site to /gfs

145 views
Skip to first unread message

izhu...@gmail.com

unread,
Dec 28, 2015, 8:31:37 PM12/28/15
to Hippo Community
I tried to deploy site from other than /site contextpath for example /gfs.

I manage creating gfs.war based on creating ROOT.war tutorial

http://www.onehippo.org/library/deployment/configuring/deploy-application-as-root_war.html

but when i tried to put gfs.war on tomcat and setting up cms/console hst:hosts

hst:defaultcontextpath=/gfs

Only blank page showed..

when i tried hst:defaultcontextpath=/site
and i put hst:contextpath=/gfs

Is there a way i can change contextpath for site module ??

---
M Zhuhriansyah R

Bert Leunis

unread,
Dec 29, 2015, 3:13:10 AM12/29/15
to Hippo Community
On Tue, Dec 29, 2015 at 1:32 AM, <izhu...@gmail.com> wrote:
I tried to deploy site from other than /site contextpath for example /gfs.

I manage creating gfs.war based on creating ROOT.war tutorial

http://www.onehippo.org/library/deployment/configuring/deploy-application-as-root_war.html
This page is (despite it's title) only about changing the default context path from /site to / on your local machine. For deployment to a server you may need to do some more steps. See for example [1]. Did you change the distribution.xml file? That page links to [2] for configuration. Did you add the URL to your deployed application to the virtual hosts?

[1] http://www.onehippo.org/library/deployment/deploy-a-project-distribution.html
[2] http://www.onehippo.org/library/enterprise/installation-and-configuration/required-configuration-after-first-deployment.html
 


but when i tried to put gfs.war on tomcat and setting up cms/console hst:hosts

hst:defaultcontextpath=/gfs

Only blank page showed..
Anything in the log files that can give you a clue?

Regards, Bert
 

when i tried hst:defaultcontextpath=/site
and i put hst:contextpath=/gfs

Is there a way i can change contextpath for site module ??

---
M Zhuhriansyah R

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

Ard Schrijvers

unread,
Dec 29, 2015, 3:43:01 AM12/29/15
to hippo-c...@googlegroups.com
Hey,

you can also check out
http://svn.onehippo.org/repos/hippo/hippo-cms7/testsuite/tags/hippo-testsuite-2.1.0/
and run that one: The testsuite starts with a site.war *and* an
intranet.war (thus two hst webapps). Perhaps you can spot the
difference with your setup for the 'intranet.war'. You can find all
the intranet configuration at [1]

HTH,

Regards Ard

[1] http://svn.onehippo.org/repos/hippo/hippo-cms7/testsuite/trunk/intranet-bootstrap/configuration
--
Hippo Netherlands, Oosteinde 11, 1017 WT Amsterdam, Netherlands
Hippo USA, Inc. 71 Summer Street, 2nd Floor Boston, MA 02110, United
states of America.

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

izhu...@gmail.com

unread,
Dec 29, 2015, 6:55:13 PM12/29/15
to Hippo Community
I finally managed to move contextpath from /site to other than ROOT.

using steps described in http://www.onehippo.org/library/deployment/configuring/deploy-application-as-root_war.html
I can run site module from ROOT contextpath without problem on cargo.run.

Instead of changing

+ hst:hst
   + hst:hosts
       - hst:defaultcontextpath = (empty string)

I adding, hst:contextpath on virtualhost node, hst:contextpath = (empty string)

When I change contextpath to /gfs and creating gfs.war instead site.war and change
hst:contextpath on virtualhost node, hst:contextpath = /gfs

I found error report like this when running cargo.run:

[WARNING] [talledLocalContainer] 06:21:22 WARN  [HstFreemarkerServlet] Repository templateSource '/webfiles/gfs/freemarker/gfs/homepage-main.ftl' not found. To see the stack trace, set 'org.hippoecm.hst.servlet.HstFreemarkerServlet' log-level to debug in log4j configuration or runtime via the logging servlet

Looks like we need extra steps when changing context path other than ROOT. We have to define webfiles for the new context path.
Then I go to cms/console, and copy

+ webfiles
   + site

to
 
+ webfiles
   + gfs

It's finally run well..
Thanks all..

Regards
M Zhuhriansyah R

Ard Schrijvers

unread,
Dec 30, 2015, 5:03:39 AM12/30/15
to hippo-c...@googlegroups.com
Hey,
Thanks for your feedback. Indeed [1] does not describe how you change
your webapp from site.war to foo.war. Indeed, you need as you found
out also rename the webfile bundle name from 'site' to 'gfs'.

The reason why we never describe this is that if we have one webapp,
we always run it as site.war. On production, we normally strip the
/site part by httpd so visitors don't get to see the /site in the URL.
Hence, it is pointless for us in general to rename site.war to
foo.war.

Hope this helps. See [2] for some httpd setup we normally use.

Regards Ard

[1] http://www.onehippo.org/library/deployment/configuring/deploy-application-as-root_war.html
[2] http://www.onehippo.org/library/deployment/configuring/configure-apache-httpd-as-reverse-proxy-for-hippo.html

izhu...@gmail.com

unread,
Dec 30, 2015, 6:07:44 AM12/30/15
to Hippo Community
Hi,

Actually my use case is using httpd setup too. Using reverse proxy.
But in my use case hippo portal is just part of a bigger portal.

we have www.domain.com already running portal, and we want to add hippo portal as part of www.domain.com on a sub path.

www.domain.com         <-- already exists
www.domain.com/data <-- already exists path

www.domain.com/sub/                  <-- want to put hippo here  
www.domain.com/sub/subsub      <-- or maybe here

We don't want to name our sub path has to be /site. So we need to able to change context path to other than /site.

If we use
proxypass /sub http://192.168.1.100:8080/site

would break some link. because hippo will use context path /site, when generate link.


There is an other way, that could be use. Using ROOT context path and alias.

/sub and /sub/subsub could be implemented using hst:alias. But I'm not sure with binaries assets link, will not going to be a problem.

Regards,
M Zhuhriansyah R

Ard Schrijvers

unread,
Dec 30, 2015, 6:30:37 AM12/30/15
to hippo-c...@googlegroups.com
Hey,

On Wed, Dec 30, 2015 at 12:07 PM, <izhu...@gmail.com> wrote:
> Hi,
>
> Actually my use case is using httpd setup too. Using reverse proxy.
> But in my use case hippo portal is just part of a bigger portal.
>
> we have www.domain.com already running portal, and we want to add hippo
> portal as part of www.domain.com on a sub path.
>
> www.domain.com <-- already exists
> www.domain.com/data <-- already exists path
>
> www.domain.com/sub/ <-- want to put hippo here
> www.domain.com/sub/subsub <-- or maybe here
>
> We don't want to name our sub path has to be /site. So we need to able to
> change context path to other than /site.
>
> If we use
> proxypass /sub http://192.168.1.100:8080/site
>
> would break some link. because hippo will use context path /site, when
> generate link.
>
>
> There is an other way, that could be use. Using ROOT context path and alias.
>
> /sub and /sub/subsub could be implemented using hst:alias. But I'm not sure
> with binaries assets link, will not going to be a problem.

Thanks for your feedback! Now I understand better why you need /gfs

Regards Ard
Reply all
Reply to author
Forward
0 new messages