I have got Typo installed on Linux using Lighttpd/FastCGI. I am using Apache as a proxy to forward all requests to lighttpd on a different port so the user won''t know they''re using a different port. However, Typo seems to know this and so some links have the actual real URL (e.g. in the RSS feeds, it shows the ''real'' URL/port). Is there any way to force Typo to use the ''friendly'' URL I want users to access from? -- Regards, David Mytton Managing Director - Olate Ltd http://www.olate.co.uk T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org
Set up both sides of the proxying in apache... both coming and going... you only have it doing ProxyPass / http://BLAH:PORT/ do the reverse as well ProxyPassReverse / http://BLAH:PORT/ David Mytton wrote:> I have got Typo installed on Linux using Lighttpd/FastCGI. I am using > Apache as a proxy to forward all requests to lighttpd on a different > port so the user won''t know they''re using a different port. > > However, Typo seems to know this and so some links have the actual > real URL (e.g. in the RSS feeds, it shows the ''real'' URL/port). Is > there any way to force Typo to use the ''friendly'' URL I want users to > access from? >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I don''t think I can do that because I''m using Apache 1.33.x. I have set up mod_proxy and am using a rewrite rule in the httpd.conf to redirect using the [P] flag. Regards, David Mytton Managing Director - Olate Ltd http://www.olate.co.uk T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org Sean T Allen wrote:> Set up both sides of the proxying in apache... both coming and going... > > you only have it doing ProxyPass / http://BLAH:PORT/ > do the reverse as well ProxyPassReverse / http://BLAH:PORT/ > > > > > David Mytton wrote: > >> I have got Typo installed on Linux using Lighttpd/FastCGI. I am using >> Apache as a proxy to forward all requests to lighttpd on a different >> port so the user won''t know they''re using a different port. >> >> However, Typo seems to know this and so some links have the actual >> real URL (e.g. in the RSS feeds, it shows the ''real'' URL/port). Is >> there any way to force Typo to use the ''friendly'' URL I want users to >> access from? >> >
you need to use mod_proxy instead. This is available for Apache 1.33 On 8/18/05, David Mytton <david-nkCc03+qR4SsTnJN9+BGXg@public.gmane.org> wrote:> I don''t think I can do that because I''m using Apache 1.33.x. I have set > up mod_proxy and am using a rewrite rule in the httpd.conf to redirect > using the [P] flag. > > Regards, > > David Mytton > Managing Director - Olate Ltd > http://www.olate.co.uk > > T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) > F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org > > > > Sean T Allen wrote: > > Set up both sides of the proxying in apache... both coming and going... > > > > you only have it doing ProxyPass / http://BLAH:PORT/ > > do the reverse as well ProxyPassReverse / http://BLAH:PORT/ > > > > > > > > > > David Mytton wrote: > > > >> I have got Typo installed on Linux using Lighttpd/FastCGI. I am using > >> Apache as a proxy to forward all requests to lighttpd on a different > >> port so the user won''t know they''re using a different port. > >> > >> However, Typo seems to know this and so some links have the actual > >> real URL (e.g. in the RSS feeds, it shows the ''real'' URL/port). Is > >> there any way to force Typo to use the ''friendly'' URL I want users to > >> access from? > >> > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://typo.leetsoft.com - Open source weblog engine http://blog.leetsoft.com - Technical weblog
This works fine with apache 1.3. I had it setup to use a rewrite rule just like you have and it did the sam thing. It would insert the port after the url. But I dumped the rewrite and just used ProxyPass and ProxyPassReverse. Now it works fine and does not display the port number. HTH Ezra On Aug 18, 2005, at 4:39 PM, David Mytton wrote:> I don''t think I can do that because I''m using Apache 1.33.x. I have > set up mod_proxy and am using a rewrite rule in the httpd.conf to > redirect using the [P] flag. > > Regards, > > David Mytton > Managing Director - Olate Ltd > http://www.olate.co.uk > > T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) > F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org > > > > Sean T Allen wrote: > >> Set up both sides of the proxying in apache... both coming and >> going... >> >> you only have it doing ProxyPass / http://BLAH:PORT/ >> do the reverse as well ProxyPassReverse / http://BLAH:PORT/ >> >> >> >> >> David Mytton wrote: >> >> >>> I have got Typo installed on Linux using Lighttpd/FastCGI. I am >>> using Apache as a proxy to forward all requests to lighttpd on a >>> different port so the user won''t know they''re using a different >>> port. >>> >>> However, Typo seems to know this and so some links have the >>> actual real URL (e.g. in the RSS feeds, it shows the ''real'' URL/ >>> port). Is there any way to force Typo to use the ''friendly'' URL I >>> want users to access from? >>> >>> >> >> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-Ezra Zygmuntowicz WebMaster Yakima Herald-Republic Newspaper ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org 509-577-7732
I just tried that but if use the ProxyPass options then only the front page will work, but there is no style and no images are shown - any links won''t work either. But if I use the rewrite rules then it works fine... any ideas? Regards, David Mytton Managing Director - Olate Ltd http://www.olate.co.uk T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org Ezra Zygmuntowicz wrote:> This works fine with apache 1.3. I had it setup to use a rewrite rule > just like you have and it did the sam thing. It would insert the port > after the url. But I dumped the rewrite and just used ProxyPass and > ProxyPassReverse. Now it works fine and does not display the port > number. > HTH > Ezra > On Aug 18, 2005, at 4:39 PM, David Mytton wrote: > >> I don''t think I can do that because I''m using Apache 1.33.x. I have >> set up mod_proxy and am using a rewrite rule in the httpd.conf to >> redirect using the [P] flag. >> >> Regards, >> >> David Mytton >> Managing Director - Olate Ltd >> http://www.olate.co.uk >> >> T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) >> F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org >> >> >> >> Sean T Allen wrote: >> >>> Set up both sides of the proxying in apache... both coming and >>> going... >>> >>> you only have it doing ProxyPass / http://BLAH:PORT/ >>> do the reverse as well ProxyPassReverse / http://BLAH:PORT/ >>> >>> >>> >>> >>> David Mytton wrote: >>> >>> >>>> I have got Typo installed on Linux using Lighttpd/FastCGI. I am >>>> using Apache as a proxy to forward all requests to lighttpd on a >>>> different port so the user won''t know they''re using a different port. >>>> >>>> However, Typo seems to know this and so some links have the actual >>>> real URL (e.g. in the RSS feeds, it shows the ''real'' URL/ port). Is >>>> there any way to force Typo to use the ''friendly'' URL I want users >>>> to access from? >>>> >>>> >>> >>> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > -Ezra Zygmuntowicz > WebMaster > Yakima Herald-Republic Newspaper > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org > 509-577-7732 >
This is what I have in my httpd.conf: <VirtualHost 81.29.70.164> ServerAlias www.blog.olate.co.uk blog.olate.co.uk ServerAdmin webmaster-PxS4CaOM9nqq7pUMH3X97A@public.gmane.org ServerName www.blog.olate.co.uk RewriteEngine On RewriteRule ^/(.*) http://blog.olate.co.uk:81/$1 [P,L] #ProxyPass / http://blog.olate.co.uk:81 #ProxyPassReverse / http://blog.olate.co.uk:81 </VirtualHost> But if I uncomment the two Proxy lines and then comment the two rewrite lines, it works, but the blog has no style or images. Take a look at http://blog.olate.co.uk/ and you can see what it is like. Regards, David Mytton Managing Director - Olate Ltd http://www.olate.co.uk T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org Ezra Zygmuntowicz wrote:> Here is the relevant portion of my virtual host that proxies to > lighttpd.: > > > <VirtualHost vintnerssecret.com> > # RewriteEngine On > # RewriteRule ^/(.*) http://vintnerssecret.com:81/$1 [P,L] > # ProxyPreserveHost On > ProxyPass / http://vintnerssecret.com:81/ > ProxyPassReverse / http://vintnerssecret.com:81/ > </VirtualHost> > > That was the rewrite rule I was using that kept adding the port > number to the url. ProxyPreserve Host is what we really want but it > is not available for apache 1.3. So we make due with the proxyPass > and ProxyPassReverse. and everything works great now. > So after much experimentation al;l you need in your vhost conf > file is this: > > <VirtualHost vintnerssecret.com> > ProxyPass / http://example.com:81/ > ProxyPassReverse / http://example.com:81/ > </VirtualHost> > > > HTH > Ezra > On Aug 19, 2005, at 4:01 AM, David Mytton wrote: > >> I just tried that but if use the ProxyPass options then only the >> front page will work, but there is no style and no images are shown >> - any links won''t work either. But if I use the rewrite rules then >> it works fine... any ideas? >> >> Regards, >> >> David Mytton >> Managing Director - Olate Ltd >> http://www.olate.co.uk >> >> T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) >> F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org >> >> >> >> Ezra Zygmuntowicz wrote: >> >>> This works fine with apache 1.3. I had it setup to use a rewrite >>> rule just like you have and it did the sam thing. It would insert >>> the port after the url. But I dumped the rewrite and just used >>> ProxyPass and ProxyPassReverse. Now it works fine and does not >>> display the port number. >>> HTH >>> Ezra >>> On Aug 18, 2005, at 4:39 PM, David Mytton wrote: >>> >>> >>>> I don''t think I can do that because I''m using Apache 1.33.x. I >>>> have set up mod_proxy and am using a rewrite rule in the >>>> httpd.conf to redirect using the [P] flag. >>>> >>>> Regards, >>>> >>>> David Mytton >>>> Managing Director - Olate Ltd >>>> http://www.olate.co.uk >>>> >>>> T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) >>>> F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org >>>> >>>> >>>> >>>> Sean T Allen wrote: >>>> >>>> >>>>> Set up both sides of the proxying in apache... both coming and >>>>> going... >>>>> >>>>> you only have it doing ProxyPass / http://BLAH:PORT/ >>>>> do the reverse as well ProxyPassReverse / http://BLAH:PORT/ >>>>> >>>>> >>>>> >>>>> >>>>> David Mytton wrote: >>>>> >>>>> >>>>> >>>>>> I have got Typo installed on Linux using Lighttpd/FastCGI. I am >>>>>> using Apache as a proxy to forward all requests to lighttpd on >>>>>> a different port so the user won''t know they''re using a >>>>>> different port. >>>>>> >>>>>> However, Typo seems to know this and so some links have the >>>>>> actual real URL (e.g. in the RSS feeds, it shows the ''real'' URL/ >>>>>> port). Is there any way to force Typo to use the ''friendly'' URL >>>>>> I want users to access from? >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> Rails mailing list >>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails >>>> >>>> >>> >>> -Ezra Zygmuntowicz >>> WebMaster >>> Yakima Herald-Republic Newspaper >>> ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org >>> 509-577-7732 >>> >> > > -Ezra Zygmuntowicz > Yakima Herald-Republic > WebMaster > 509-577-7732 > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org >
Heh, yep. The problem was there were no trailing slashes - thanks! It is working now! Regards, David Mytton Managing Director - Olate Ltd http://www.olate.co.uk T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org Ezra Zygmuntowicz wrote:> It looks like you forgot the trailing slash on your ProxyPass and > ProxyPassReverse. Try again by commenting out all rewrites except the > two proxypass statements and make sure you include the trailing > slashes. It should then work. Mine is working fine right now on > Debian Sarge with apache 1.3.33. > So try to use this vhost setup: > > <VirtualHost www.blog.olate.co.uk> > ServerAlias www.blog.olate.co.uk blog.olate.co.uk > ServerAdmin webmaster-PxS4CaOM9nqq7pUMH3X97A@public.gmane.org > ServerName www.blog.olate.co.uk > ProxyPass / http://blog.olate.co.uk:81/ > ProxyPassReverse / http://blog.olate.co.uk:81/ > </VirtualHost> > > HTH- > -Ezra > On Aug 19, 2005, at 1:23 PM, David Mytton wrote: > >> This is what I have in my httpd.conf: >> >> <VirtualHost 81.29.70.164> >> ServerAlias www.blog.olate.co.uk blog.olate.co.uk >> ServerAdmin webmaster-PxS4CaOM9nqq7pUMH3X97A@public.gmane.org >> ServerName www.blog.olate.co.uk >> RewriteEngine On >> RewriteRule ^/(.*) http://blog.olate.co.uk:81/$1 [P,L] >> #ProxyPass / http://blog.olate.co.uk:81 > ProxyPass / http://blog.olate.co.uk:81/ >> #ProxyPassReverse / http://blog.olate.co.uk:81 > ProxyPassReverse / http://blog.olate.co.uk:81/ >> >> </VirtualHost> >> >> But if I uncomment the two Proxy lines and then comment the two >> rewrite lines, it works, but the blog has no style or images. Take a >> look at http://blog.olate.co.uk/ and you can see what it is like. >> >> Regards, >> >> David Mytton >> Managing Director - Olate Ltd >> http://www.olate.co.uk >> >> T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) >> F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org >> >> >> >> Ezra Zygmuntowicz wrote: >> >>> Here is the relevant portion of my virtual host that proxies to >>> lighttpd.: >>> >>> >>> <VirtualHost vintnerssecret.com> >>> # RewriteEngine On >>> # RewriteRule ^/(.*) http://vintnerssecret.com:81/$1 [P,L] >>> # ProxyPreserveHost On >>> ProxyPass / http://vintnerssecret.com:81/ >>> ProxyPassReverse / http://vintnerssecret.com:81/ >>> </VirtualHost> >>> >>> That was the rewrite rule I was using that kept adding the port >>> number to the url. ProxyPreserve Host is what we really want but >>> it is not available for apache 1.3. So we make due with the >>> proxyPass and ProxyPassReverse. and everything works great now. >>> So after much experimentation al;l you need in your vhost conf >>> file is this: >>> >>> <VirtualHost vintnerssecret.com> >>> ProxyPass / http://example.com:81/ >>> ProxyPassReverse / http://example.com:81/ >>> </VirtualHost> >>> >>> >>> HTH >>> Ezra >>> On Aug 19, 2005, at 4:01 AM, David Mytton wrote: >>> >>> >>>> I just tried that but if use the ProxyPass options then only the >>>> front page will work, but there is no style and no images are >>>> shown - any links won''t work either. But if I use the rewrite >>>> rules then it works fine... any ideas? >>>> >>>> Regards, >>>> >>>> David Mytton >>>> Managing Director - Olate Ltd >>>> http://www.olate.co.uk >>>> >>>> T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) >>>> F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org >>>> >>>> >>>> >>>> Ezra Zygmuntowicz wrote: >>>> >>>> >>>>> This works fine with apache 1.3. I had it setup to use a rewrite >>>>> rule just like you have and it did the sam thing. It would >>>>> insert the port after the url. But I dumped the rewrite and >>>>> just used ProxyPass and ProxyPassReverse. Now it works fine and >>>>> does not display the port number. >>>>> HTH >>>>> Ezra >>>>> On Aug 18, 2005, at 4:39 PM, David Mytton wrote: >>>>> >>>>> >>>>> >>>>>> I don''t think I can do that because I''m using Apache 1.33.x. I >>>>>> have set up mod_proxy and am using a rewrite rule in the >>>>>> httpd.conf to redirect using the [P] flag. >>>>>> >>>>>> Regards, >>>>>> >>>>>> David Mytton >>>>>> Managing Director - Olate Ltd >>>>>> http://www.olate.co.uk >>>>>> >>>>>> T: (646) 257 3714 (USA) T: (020) 7870 9176 (UK) >>>>>> F: (0870) 705 1068 (UK) E: support-ELxQ3fsViAr10XsdtD+oqA@public.gmane.org >>>>>> >>>>>> >>>>>> >>>>>> Sean T Allen wrote: >>>>>> >>>>>> >>>>>> >>>>>>> Set up both sides of the proxying in apache... both coming >>>>>>> and going... >>>>>>> >>>>>>> you only have it doing ProxyPass / http://BLAH:PORT/ >>>>>>> do the reverse as well ProxyPassReverse / http://BLAH:PORT/ >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> David Mytton wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> I have got Typo installed on Linux using Lighttpd/FastCGI. I >>>>>>>> am using Apache as a proxy to forward all requests to >>>>>>>> lighttpd on a different port so the user won''t know they''re >>>>>>>> using a different port. >>>>>>>> >>>>>>>> However, Typo seems to know this and so some links have the >>>>>>>> actual real URL (e.g. in the RSS feeds, it shows the ''real'' >>>>>>>> URL/ port). Is there any way to force Typo to use the >>>>>>>> ''friendly'' URL I want users to access from? >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> _______________________________________________ >>>>>> Rails mailing list >>>>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>>>> http://lists.rubyonrails.org/mailman/listinfo/rails >>>>>> >>>>>> >>>>>> >>>>> >>>>> -Ezra Zygmuntowicz >>>>> WebMaster >>>>> Yakima Herald-Republic Newspaper >>>>> ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org >>>>> 509-577-7732 >>>>> >>>>> >>>> >>>> >>> >>> -Ezra Zygmuntowicz >>> Yakima Herald-Republic >>> WebMaster >>> 509-577-7732 >>> ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org >>> >> > > -Ezra Zygmuntowicz > Yakima Herald-Republic > WebMaster > 509-577-7732 > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org >
well check the source of the html page and check what''s wrong...> But if I uncomment the two Proxy lines and then comment the two rewrite > lines, it works, but the blog has no style or images. Take a look at > http://blog.olate.co.uk/ and you can see what it is like.-- Tobi http://typo.leetsoft.com - Open source weblog engine http://blog.leetsoft.com - Technical weblog