Hi, Could someone who has Lighttpd with sub domains for different rails apps have a look at part of my .conf file at http://www.rafb.net/paste/results/WdT2vD63.html to tell me where I''m going wrong? Whatever URL I access it from, I always get the blog at /home/notes/blog launching! -- 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
On Aug 15, 2005, at 2:15 PM, David Mytton wrote:> Hi, > > Could someone who has Lighttpd with sub domains for different rails > apps have a look at part of my .conf file at > http://www.rafb.net/paste/results/WdT2vD63.html to tell me where I''m > going wrong? Whatever URL I access it from, I always get the blog at > /home/notes/blog launching! > -- > Regards, > > David MyttonTry =~ instead of = -Scott
> Scott Barron wrote:> Try =~ instead of = Yeh, I tried that before but it didn''t make any difference. 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
as scott said you need to use =~, you cant use regex with == (as you are doing). and maybe try changing it to: $HTTP["host"] =~ "^blog\.boxednotes\.(name|com|net|org)$" { } and dont forget to restart lighttpd ;) check ALL error/access logs, and make sure browser is current that sends Host: header. On 8/15/05, David Mytton <david-nkCc03+qR4SsTnJN9+BGXg@public.gmane.org> wrote:> > Scott Barron wrote: > > Try =~ instead of => > Yeh, I tried that before but it didn''t make any difference. > > 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 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
on a side note, what are the rewrites for :-/ i run rails on lighttpd and havent had to insert rewrites before, i believe that is the reason for the error-hander = dispatch.fcgi. On 8/15/05, Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> as scott said you need to use =~, you cant use regex with == (as you are doing). > > and maybe try changing it to: > > $HTTP["host"] =~ "^blog\.boxednotes\.(name|com|net|org)$" { } > > and dont forget to restart lighttpd ;) check ALL error/access logs, > and make sure browser is current that sends Host: header. > > On 8/15/05, David Mytton <david-nkCc03+qR4SsTnJN9+BGXg@public.gmane.org> wrote: > > > Scott Barron wrote: > > > Try =~ instead of => > > > Yeh, I tried that before but it didn''t make any difference. > > > > 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 > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >-- Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Ok - I have made those changes and move the fascgi bits inside the host bits - but when I do this, instead of displaying anything, when I browse to the page my browser tries to download the file. http://www.rafb.net/paste/results/lAIxKh63.html is the new version 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 Zachery Hostens wrote:> on a side note, what are the rewrites for :-/ i run rails on lighttpd > and havent had to insert rewrites before, i believe that is the reason > for the error-hander = dispatch.fcgi. > > > On 8/15/05, Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>as scott said you need to use =~, you cant use regex with == (as you are doing). >> >>and maybe try changing it to: >> >>$HTTP["host"] =~ "^blog\.boxednotes\.(name|com|net|org)$" { } >> >>and dont forget to restart lighttpd ;) check ALL error/access logs, >>and make sure browser is current that sends Host: header. >> >>On 8/15/05, David Mytton <david-nkCc03+qR4SsTnJN9+BGXg@public.gmane.org> wrote: >> >>> > Scott Barron wrote: >>> > Try =~ instead of =>>> >>>Yeh, I tried that before but it didn''t make any difference. >>> >>>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 >>>_______________________________________________ >>>Rails mailing list >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> >> >>-- >>Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > >
Hi, Do you have mime types defined in your config file? If not, add this: mimetype.assign = ( ".rpm" => "application/x-rpm", ".pdf" => "application/pdf", ".sig" => "application/pgp-signature", ".spl" => "application/futuresplash", ".class" => "application/octet-stream", ".ps" => "application/postscript", ".torrent" => "application/x-bittorrent", ".dvi" => "application/x-dvi", ".gz" => "application/x-gzip", ".pac" => "application/x-ns-proxy-autoconfig", ".swf" => "application/x-shockwave-flash", ".tar.gz" => "application/x-tgz", ".tgz" => "application/x-tgz", ".tar" => "application/x-tar", ".zip" => "application/zip", ".mp3" => "audio/mpeg", ".m3u" => "audio/x-mpegurl", ".wma" => "audio/x-ms-wma", ".wax" => "audio/x-ms-wax", ".ogg" => "audio/x-wav", ".wav" => "audio/x-wav", ".gif" => "image/gif", ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".png" => "image/png", ".xbm" => "image/x-xbitmap", ".xpm" => "image/x-xpixmap", ".xwd" => "image/x-xwindowdump", ".css" => "text/css", ".html" => "text/html", ".htm" => "text/html", ".js" => "text/javascript", ".asc" => "text/plain", ".c" => "text/plain", ".conf" => "text/plain", ".text" => "text/plain", ".txt" => "text/plain", ".dtd" => "text/xml", ".xml" => "text/xml", ".mpeg" => "video/mpeg", ".mpg" => "video/mpeg", ".mov" => "video/quicktime", ".qt" => "video/quicktime", ".avi" => "video/x-msvideo", ".asf" => "video/x-ms-asf", ".asx" => "video/x-ms-asf", ".wmv" => "video/x-ms-wmv", ".bz2" => "application/x-bzip", ".tbz" => "application/x-bzip-compressed-tar", ".tar.bz2" => "application/x-bzip-compressed-tar" ) On 8/16/05, David Mytton <david-nkCc03+qR4SsTnJN9+BGXg@public.gmane.org> wrote:> Ok - I have made those changes and move the fascgi bits inside the host > bits - but when I do this, instead of displaying anything, when I browse > to the page my browser tries to download the file. > > http://www.rafb.net/paste/results/lAIxKh63.html is the new version > > 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
Yeh - they''re at the bottom of the file. I just removed them from the paste bin version. 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 Ben Myles wrote:> Hi, > > Do you have mime types defined in your config file? If not, add this: > > mimetype.assign = ( > ".rpm" => "application/x-rpm", > ".pdf" => "application/pdf", > ".sig" => "application/pgp-signature", > ".spl" => "application/futuresplash", > ".class" => "application/octet-stream", > ".ps" => "application/postscript", > ".torrent" => "application/x-bittorrent", > ".dvi" => "application/x-dvi", > ".gz" => "application/x-gzip", > ".pac" => "application/x-ns-proxy-autoconfig", > ".swf" => "application/x-shockwave-flash", > ".tar.gz" => "application/x-tgz", > ".tgz" => "application/x-tgz", > ".tar" => "application/x-tar", > ".zip" => "application/zip", > ".mp3" => "audio/mpeg", > ".m3u" => "audio/x-mpegurl", > ".wma" => "audio/x-ms-wma", > ".wax" => "audio/x-ms-wax", > ".ogg" => "audio/x-wav", > ".wav" => "audio/x-wav", > ".gif" => "image/gif", > ".jpg" => "image/jpeg", > ".jpeg" => "image/jpeg", > ".png" => "image/png", > ".xbm" => "image/x-xbitmap", > ".xpm" => "image/x-xpixmap", > ".xwd" => "image/x-xwindowdump", > ".css" => "text/css", > ".html" => "text/html", > ".htm" => "text/html", > ".js" => "text/javascript", > ".asc" => "text/plain", > ".c" => "text/plain", > ".conf" => "text/plain", > ".text" => "text/plain", > ".txt" => "text/plain", > ".dtd" => "text/xml", > ".xml" => "text/xml", > ".mpeg" => "video/mpeg", > ".mpg" => "video/mpeg", > ".mov" => "video/quicktime", > ".qt" => "video/quicktime", > ".avi" => "video/x-msvideo", > ".asf" => "video/x-ms-asf", > ".asx" => "video/x-ms-asf", > ".wmv" => "video/x-ms-wmv", > ".bz2" => "application/x-bzip", > ".tbz" => "application/x-bzip-compressed-tar", > ".tar.bz2" => "application/x-bzip-compressed-tar" > ) > > > On 8/16/05, David Mytton <david-nkCc03+qR4SsTnJN9+BGXg@public.gmane.org> wrote: > >>Ok - I have made those changes and move the fascgi bits inside the host >>bits - but when I do this, instead of displaying anything, when I browse >>to the page my browser tries to download the file. >> >>http://www.rafb.net/paste/results/lAIxKh63.html is the new version >> >>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
You also need a line like this in each vhost: server.error-handler-404 = "/dispatch.fcgi" I don''t think that is your main problem but you definitely need it in there. HTH Ezra On Aug 16, 2005, at 1:04 AM, David Mytton wrote:> Ok - I have made those changes and move the fascgi bits inside the > host bits - but when I do this, instead of displaying anything, > when I browse to the page my browser tries to download the file. > > http://www.rafb.net/paste/results/lAIxKh63.html is the new version > > 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 > > > > Zachery Hostens wrote: > >> on a side note, what are the rewrites for :-/ i run rails on >> lighttpd >> and havent had to insert rewrites before, i believe that is the >> reason >> for the error-hander = dispatch.fcgi. >> On 8/15/05, Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> as scott said you need to use =~, you cant use regex with == (as >>> you are doing). >>> >>> and maybe try changing it to: >>> >>> $HTTP["host"] =~ "^blog\.boxednotes\.(name|com|net|org)$" { } >>> >>> and dont forget to restart lighttpd ;) check ALL error/access logs, >>> and make sure browser is current that sends Host: header. >>> >>> On 8/15/05, David Mytton <david-nkCc03+qR4SsTnJN9+BGXg@public.gmane.org> wrote: >>> >>> >>>> > Scott Barron wrote: >>>> > Try =~ instead of =>>>> >>>> Yeh, I tried that before but it didn''t make any difference. >>>> >>>> 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 >>>> _______________________________________________ >>>> Rails mailing list >>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails >>>> >>>> >>> >>> >>> -- >>> Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> >>> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org