You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Rovi <ro...@yahoo.com> on 2005/12/26 08:11:05 UTC

VurtualHost settings for direct domain

Hi,
I need help with setting up the right url for my web site. I followed the 
direction in http://solprovider.com/lenya/proxy to set up proxy for the live 
site like this:


NameVirtualHost *:80
<VirtualHost *:80>
ServerName livelenya.domain.com 
RewriteEngine On
RewriteRule ^/veg/live/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P] 
RewriteRule ^/veg/authoring/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P] 
RewriteRule ^/lenya/(.*)$ http://127.0.0.1:8888/lenya/$1 [P] 
RewriteRule ^/kupu/(.*)$ http://127.0.0.1:8888/kupu/$1 [P] 
RewriteRule ^/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P] 
</VirtualHost>

The redirect does work - as I can confirm by replacing the last RewriteRule 
above with another url. But if I set it up exactly like above, and go to 
livelenya.domain.com from another pc, it actually shows this url 
(http://127.0.0.1:8888/pub/live/index.html) and takes me to 'Page cannot be 
displayed' error.

Basically I am looking to redirect from www.domain.com to 
www.domain.com/pub/live/index.html; or better still I want www.domain.com to 
take me directly to www.domain.com/index.html which should be my lenya hosted 
site. And I also want to be able to host multiple lenya publications as well 
(for example www.anotherdomain.com points to another Lenya publication.
Can this be done? If yes, would appreciate any pointers. If not, would like to 
know what is the best practice that people follow to host multiple domains 
against multiple lenya publications.
(I am all set if I were to forward www.domain.com to http://live.domain.com, 
for example - but I don't want a sub domain to show up in the url for most 
part of the publication)
Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by so...@apache.org.
On 12/31/05, Rovi <ro...@yahoo.com> wrote:
> the search result pages point to
> http://www.domain.com/pub/live/page.html, and subsequently again the context
> changes to /pub/live. Any ideas how to fix this? Thanks!

FILE: {pub}\lenya\xslt\search\search-and-results.xsl
Remove the match for "uri".

It is now documented.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by Rovi <ro...@yahoo.com>.
> Its still the same behavior. So I guess I will go ahead and learn to live 
with 
> it. But this is still good.
> 
> By the way, if you can document what you have implemented, that you would 
> really great. Ability to edit any page from right there is cool. But then 
you 
> seem to have authentication integral to your live site. I am not sure how 
this 
> can work for an anonymous site. 
> Thanks for your help!
> 
One more issue: the search result pages point to 
http://www.domain.com/pub/live/page.html, and subsequently again the context 
changes to /pub/live. Any ideas how to fix this? Thanks!




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by Rovi <ro...@yahoo.com>.
 <solprovider <at> apache.org> writes:

> > Thanks much!
> > Specifying http://www.domain.com/index.html made it work ok. When I checked
> > file publication-sitemap.xmap, it already had <map:redirect-to
> > uri="index.html"/>. But I went ahead and changed it to <map:redirect-to
> > uri="../../index.html"/> and it works fine now!!
> > For authoring, clicking on Editor now takes me to
> > http://www.domain.com:8888/index.html, and changing it manually to
> > http://www.domain.com:8888/pub/authoring/index.html makes it work now. 
This is
> > something I can live with by using a sub-domain to forward directly to it. 
If
> > there is any further suggestion you have to make it work perfectly, it 
would
> > be great. In any case, I am good to go now. Its a major issue resolved for 
me,
> > and thank you so much! :)
> 
> Oops.  I meant:
> <map:redirect-to uri="/index.html"/>
> But if it works, do not break it.
> 
> Our setup has a separate DNS name and virtual server for authoring. 
> We have an EDIT button (which opens the current page on the other
> server) in our function menu that appears when a visitor is
> authenticated and in the Editors Group.  It requires changing
> login.xsp.  There is too much code for a post; maybe I will document
> it sometime.
> 
> solprovider
> 

Its still the same behavior. So I guess I will go ahead and learn to live with 
it. But this is still good.

By the way, if you can document what you have implemented, that you would 
really great. Ability to edit any page from right there is cool. But then you 
seem to have authentication integral to your live site. I am not sure how this 
can work for an anonymous site. 
Thanks for your help!




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by so...@apache.org.
On 12/29/05, Rovi <ro...@yahoo.com> wrote:
>  <solprovider <at> apache.org> writes:
> > > (10) If I manually remove menuitem.html to make the url
> http://www.domain.com,
> > > and press enter, it again goes back to
> > > http://www.domain.com/pub/live/index.html
> > So the homepage redirects to "/pub/live/index.html", but everything
> > else seems to work as desired.
> > My guess is it is Lenya doing the redirect, not Apache httpd.
> > What happens if you specify the page?
> > http://www.domain.com/index.html
> >
> > If that works, check the match for "no page specified":
> > FILE: {pub}/publication-sitemap.xmap
> >      <map:match pattern="**/">
> >           <map:redirect-to uri="/{pub}/live/index.html"/>
> >       </map:match>
> > CHANGE TO:
> >           <map:redirect-to uri="index.html"/>
> Thanks much!
> Specifying http://www.domain.com/index.html made it work ok. When I checked
> file publication-sitemap.xmap, it already had <map:redirect-to
> uri="index.html"/>. But I went ahead and changed it to <map:redirect-to
> uri="../../index.html"/> and it works fine now!!
> For authoring, clicking on Editor now takes me to
> http://www.domain.com:8888/index.html, and changing it manually to
> http://www.domain.com:8888/pub/authoring/index.html makes it work now. This is
> something I can live with by using a sub-domain to forward directly to it. If
> there is any further suggestion you have to make it work perfectly, it would
> be great. In any case, I am good to go now. Its a major issue resolved for me,
> and thank you so much! :)

Oops.  I meant:
<map:redirect-to uri="/index.html"/>
But if it works, do not break it.

Our setup has a separate DNS name and virtual server for authoring. 
We have an EDIT button (which opens the current page on the other
server) in our function menu that appears when a visitor is
authenticated and in the Editors Group.  It requires changing
login.xsp.  There is too much code for a post; maybe I will document
it sometime.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by Rovi <ro...@yahoo.com>.
 <solprovider <at> apache.org> writes:

> > (10) If I manually remove menuitem.html to make the url 
http://www.domain.com,
> > and press enter, it again goes back to
> > http://www.domain.com/pub/live/index.html
> 
> So the homepage redirects to "/pub/live/index.html", but everything
> else seems to work as desired.
> 
> My guess is it is Lenya doing the redirect, not Apache httpd.
> What happens if you specify the page?
> http://www.domain.com/index.html
> 
> If that works, check the match for "no page specified":
> FILE: {pub}/publication-sitemap.xmap
>      <map:match pattern="**/">
>           <map:redirect-to uri="/{pub}/live/index.html"/>
>       </map:match>
> CHANGE TO:
>           <map:redirect-to uri="index.html"/>
> 
> solprovider
> 
Thanks much!
Specifying http://www.domain.com/index.html made it work ok. When I checked 
file publication-sitemap.xmap, it already had <map:redirect-to 
uri="index.html"/>. But I went ahead and changed it to <map:redirect-to 
uri="../../index.html"/> and it works fine now!!
For authoring, clicking on Editor now takes me to 
http://www.domain.com:8888/index.html, and changing it manually to 
http://www.domain.com:8888/pub/authoring/index.html makes it work now. This is 
something I can live with by using a sub-domain to forward directly to it. If 
there is any further suggestion you have to make it work perfectly, it would 
be great. In any case, I am good to go now. Its a major issue resolved for me, 
and thank you so much! :)






---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by so...@apache.org.
On 12/28/05, Rovi <ro...@yahoo.com> wrote:
> (1) I enter http://www.domain.com
> (2) It immediately (without any click) changes to
> http://www.domain.com/pub/live/index.html
> (3) In view source: href="/pub/live/css/page.css"; <img alt="project logo"
> src="/pub/live/images/project-logo.png" />; <div class="tab"><a
> href="menuitem.html">menuitem</a></div>
> (4) If I hover over menuitem, I see
> http://www.domain.com/pub/live/menuitem.html
> (5) In the address bar, I manually remove pub/live/ and press enter. The page
> does not change.
> (6) In View source: href="/pub/live/css/page.css"; <img alt="project logo"
> src="/pub/live/images/project-logo.png" />; <div class="tab"><a
> href="menuitem.html">menuitem</a></div>
> (7) If I hover over menuitem, I see http://www.domain.com/menuitem.html
> (8) If I click over menuitem, the next page is
> http://www.domain.com/menuitem.html
> (9) On the view source of this page: href="/pub/live/css/page.css"; ><img
> alt="project logo" src="/pub/live/images/project-logo.png" />; <div class="tab-
> selected">menuitem</div>; div class="tab"><a
> href="anothermenuitem.html">anothermenuitem</a></div>
> (10) If I manually remove menuitem.html to make the url http://www.domain.com,
> and press enter, it again goes back to
> http://www.domain.com/pub/live/index.html

So the homepage redirects to "/pub/live/index.html", but everything
else seems to work as desired.

My guess is it is Lenya doing the redirect, not Apache httpd.
What happens if you specify the page?
http://www.domain.com/index.html

If that works, check the match for "no page specified":
FILE: {pub}/publication-sitemap.xmap
     <map:match pattern="**/">
          <map:redirect-to uri="/{pub}/live/index.html"/>
      </map:match>
CHANGE TO:
          <map:redirect-to uri="index.html"/>

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by Rovi <ro...@yahoo.com>.
 <solprovider <at> apache.org> writes:

> 
> On 12/28/05, Rovi <ro1vi-cms <at> yahoo.com> wrote:
> > Sorry about the confusion. It still does not work. So basically
> > http://www.domain.com/pub/live/ is what displays on my address bar all the
> > time (followed by whichever folder and file name). Any ideas please?
> 
> Please give more information.  Open Browser.  Address = http://www.domain.com
> Press ENTER.  Does the homepage open?  What is in the address bar?
> 
> Check your links.  Do they have /pub/live in the HREFs?  Is it when
> opening the second page that "/pub/live" appears?
> 
> What happens if you remove the "/pub/live" from an address?  Does the
> page appear correctly?  Does the address change back?  Do the links
> have "/pub/live" in them?
> 
> Our production server is Lenya behind Apache.  Our addresses do not
> include "/pub/live".
> 
> solprovider
> 
(1) I enter http://www.domain.com
(2) It immediately (without any click) changes to 
http://www.domain.com/pub/live/index.html
(3) In view source: href="/pub/live/css/page.css"; <img alt="project logo" 
src="/pub/live/images/project-logo.png" />; <div class="tab"><a 
href="menuitem.html">menuitem</a></div>
(4) If I hover over menuitem, I see 
http://www.domain.com/pub/live/menuitem.html
(5) In the address bar, I manually remove pub/live/ and press enter. The page 
does not change.
(6) In View source: href="/pub/live/css/page.css"; <img alt="project logo" 
src="/pub/live/images/project-logo.png" />; <div class="tab"><a 
href="menuitem.html">menuitem</a></div>
(7) If I hover over menuitem, I see http://www.domain.com/menuitem.html
(8) If I click over menuitem, the next page is 
http://www.domain.com/menuitem.html
(9) On the view source of this page: href="/pub/live/css/page.css"; ><img 
alt="project logo" src="/pub/live/images/project-logo.png" />; <div class="tab-
selected">menuitem</div>; div class="tab"><a 
href="anothermenuitem.html">anothermenuitem</a></div>
(10) If I manually remove menuitem.html to make the url http://www.domain.com, 
and press enter, it again goes back to 
http://www.domain.com/pub/live/index.html

Please see if this behavior gives you any clue. Thanks much!




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by so...@apache.org.
On 12/28/05, Rovi <ro...@yahoo.com> wrote:
> Sorry about the confusion. It still does not work. So basically
> http://www.domain.com/pub/live/ is what displays on my address bar all the
> time (followed by whichever folder and file name). Any ideas please?

Please give more information.  Open Browser.  Address = http://www.domain.com
Press ENTER.  Does the homepage open?  What is in the address bar?

Check your links.  Do they have /pub/live in the HREFs?  Is it when
opening the second page that "/pub/live" appears?

What happens if you remove the "/pub/live" from an address?  Does the
page appear correctly?  Does the address change back?  Do the links
have "/pub/live" in them?

Our production server is Lenya behind Apache.  Our addresses do not
include "/pub/live".

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by Rovi <ro...@yahoo.com>.
 <solprovider <at> apache.org> writes:

> >
> > The redirect does work - as I can confirm by replacing the last RewriteRule
> > above with another url. But if I set it up exactly like above, and go to
> > livelenya.domain.com from another pc, it actually shows this url
> > (http://127.0.0.1:8888/pub/live/index.html) and takes me to 'Page cannot be
> > displayed' error.
> 
> You did not change the targets to your publication-id.  Every "pub"
> must be changed to "veg".
> 
> solprovider
> 
That was a typo in the message above. The actual file had the right values. 
Sorry about the confusion. It still does not work. So basically 
http://www.domain.com/pub/live/ is what displays on my address bar all the 
time (followed by whichever folder and file name). Any ideas please?



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by so...@apache.org.
On 12/26/05, Rovi <ro...@yahoo.com> wrote:
> I need help with setting up the right url for my web site. I followed the
> direction in http://solprovider.com/lenya/proxy to set up proxy for the live
> site like this:
> NameVirtualHost *:80
> <VirtualHost *:80>
> ServerName livelenya.domain.com
> RewriteEngine On
> RewriteRule ^/veg/live/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P]
> RewriteRule ^/veg/authoring/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P]
> RewriteRule ^/lenya/(.*)$ http://127.0.0.1:8888/lenya/$1 [P]
> RewriteRule ^/kupu/(.*)$ http://127.0.0.1:8888/kupu/$1 [P]
> RewriteRule ^/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P]
> </VirtualHost>
>
> The redirect does work - as I can confirm by replacing the last RewriteRule
> above with another url. But if I set it up exactly like above, and go to
> livelenya.domain.com from another pc, it actually shows this url
> (http://127.0.0.1:8888/pub/live/index.html) and takes me to 'Page cannot be
> displayed' error.

You did not change the targets to your publication-id.  Every "pub"
must be changed to "veg".

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by Michael Wechner <mi...@wyona.com>.
Rovi wrote:

>Rovi <ro1vi-cms <at> yahoo.com> writes:
>
>  
>
>>Hi,
>>I need help with setting up the right url for my web site. I followed the 
>>direction in http://solprovider.com/lenya/proxy to set up proxy for the live 
>>site like this:
>>
>>NameVirtualHost *:80
>><VirtualHost *:80>
>>ServerName livelenya.domain.com 
>>RewriteEngine On
>>RewriteRule ^/veg/live/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P] 
>>RewriteRule ^/veg/authoring/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P] 
>>RewriteRule ^/lenya/(.*)$ http://127.0.0.1:8888/lenya/$1 [P] 
>>RewriteRule ^/kupu/(.*)$ http://127.0.0.1:8888/kupu/$1 [P] 
>>RewriteRule ^/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P] 
>></VirtualHost>
>>
>>The redirect does work - as I can confirm by replacing the last RewriteRule 
>>above with another url. But if I set it up exactly like above, and go to 
>>livelenya.domain.com from another pc, it actually shows this url 
>>(http://127.0.0.1:8888/pub/live/index.html) and takes me to 'Page cannot be 
>>displayed' error.
>>
>>Basically I am looking to redirect from www.domain.com to 
>>www.domain.com/pub/live/index.html; or better still I want www.domain.com to 
>>take me directly to www.domain.com/index.html which should be my lenya 
>>    
>>
>hosted 
>  
>
>>site. And I also want to be able to host multiple lenya publications as well 
>>(for example www.anotherdomain.com points to another Lenya publication.
>>Can this be done? If yes, would appreciate any pointers. If not, would like 
>>    
>>
>to 
>  
>
>>know what is the best practice that people follow to host multiple domains 
>>against multiple lenya publications.
>>(I am all set if I were to forward www.domain.com to http://live.domain.com, 
>>for example - but I don't want a sub domain to show up in the url for most 
>>part of the publication)
>>Thanks!
>>
>>    
>>
>ok, adding:
>ProxyPreserveHost On
>to the VirtualHost now lets me go to 
>http://livelenya.domain.com/pub/live/index.html when I enter 
>http://livelenya.domain.com (it also works to take me to 
>http://www.domain.com/pub/live/index.html when I enter http://www.domain.com 
>in the address bar). So this is pretty good. 
>Now, if I then manually delete /pub/live from the url, it takes me to 
>http://www.domain.com/index.html and the page is same as 
>http://www.domain.com/pub/live/index.html. Further, the entire navigation 
>works great - without any need for /pub/live in the url (which is what I am 
>looking for). But the only remaining piece is: why should I need to do it 
>manually?
>

I am not sure if I fully understand, but aren't people entering 
http://www.domain.com from
the very beginning?

Michi

> Or what can I do so that it jumps to 
>http://www.domain.com/index.html automatically after taking the context of the 
>directed publication.
>I am optimistic that the Apache/Lenya gurus out there would have an answer to 
>this. Thanks!
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: VurtualHost settings for direct domain

Posted by Rovi <ro...@yahoo.com>.
Rovi <ro1vi-cms <at> yahoo.com> writes:

> 
> Hi,
> I need help with setting up the right url for my web site. I followed the 
> direction in http://solprovider.com/lenya/proxy to set up proxy for the live 
> site like this:
> 
> NameVirtualHost *:80
> <VirtualHost *:80>
> ServerName livelenya.domain.com 
> RewriteEngine On
> RewriteRule ^/veg/live/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P] 
> RewriteRule ^/veg/authoring/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P] 
> RewriteRule ^/lenya/(.*)$ http://127.0.0.1:8888/lenya/$1 [P] 
> RewriteRule ^/kupu/(.*)$ http://127.0.0.1:8888/kupu/$1 [P] 
> RewriteRule ^/(.*)$ http://127.0.0.1:8888/pub/live/$1 [P] 
> </VirtualHost>
> 
> The redirect does work - as I can confirm by replacing the last RewriteRule 
> above with another url. But if I set it up exactly like above, and go to 
> livelenya.domain.com from another pc, it actually shows this url 
> (http://127.0.0.1:8888/pub/live/index.html) and takes me to 'Page cannot be 
> displayed' error.
> 
> Basically I am looking to redirect from www.domain.com to 
> www.domain.com/pub/live/index.html; or better still I want www.domain.com to 
> take me directly to www.domain.com/index.html which should be my lenya 
hosted 
> site. And I also want to be able to host multiple lenya publications as well 
> (for example www.anotherdomain.com points to another Lenya publication.
> Can this be done? If yes, would appreciate any pointers. If not, would like 
to 
> know what is the best practice that people follow to host multiple domains 
> against multiple lenya publications.
> (I am all set if I were to forward www.domain.com to http://live.domain.com, 
> for example - but I don't want a sub domain to show up in the url for most 
> part of the publication)
> Thanks!
> 
ok, adding:
ProxyPreserveHost On
to the VirtualHost now lets me go to 
http://livelenya.domain.com/pub/live/index.html when I enter 
http://livelenya.domain.com (it also works to take me to 
http://www.domain.com/pub/live/index.html when I enter http://www.domain.com 
in the address bar). So this is pretty good. 
Now, if I then manually delete /pub/live from the url, it takes me to 
http://www.domain.com/index.html and the page is same as 
http://www.domain.com/pub/live/index.html. Further, the entire navigation 
works great - without any need for /pub/live in the url (which is what I am 
looking for). But the only remaining piece is: why should I need to do it 
manually? Or what can I do so that it jumps to 
http://www.domain.com/index.html automatically after taking the context of the 
directed publication.
I am optimistic that the Apache/Lenya gurus out there would have an answer to 
this. Thanks!



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org