I''m trying to get a site working on TxD with lighttpd. I''ve got a working lighttpd.conf file with another Rails site, so I added a similar entry in it for the new Rails site. But I''m getting a 403 Forbidden error. What could be the cause of that?
On 8/12/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to get a site working on TxD with lighttpd. I''ve got a > working lighttpd.conf file with another Rails site, so I added a > similar entry in it for the new Rails site. But I''m getting a 403 > Forbidden error. > > What could be the cause of that?Have you made dispatch.fcgi executable? Is there anything in the error_log or crash log?> _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers Koz
On 8/11/05, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/12/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m trying to get a site working on TxD with lighttpd. I''ve got a > > working lighttpd.conf file with another Rails site, so I added a > > similar entry in it for the new Rails site. But I''m getting a 403 > > Forbidden error. > > > > What could be the cause of that? > > Have you made dispatch.fcgi executable? Is there anything in the > error_log or crash log?Yes, it''s executable. And nothing of interest in the lighttpd error log, the production.log, or fastcgi-crash.log. Here''s the entire lighttpd.conf file server.pid-file = "/home/joevd/lighttpd/lighttpd.pid" server.document-root = "/home/joevd/domains/joevandyk.com/public_html/site/" server.port = 2527 server.modules = ( "mod_rewrite", "mod_fastcgi" ) server.indexfiles = ( "index.html" ) $HTTP["host"] =~ "joevandyk.com" { server.document-root = "/home/joevd/domains/joevandyk.com/public_html/site/" server.errorlog = "/home/joevd/lighttpd/joevandyk-error.log" } $HTTP["host"] =~ "steaklessinseattle" { server.document-root "/home/joevd/domains/steaklessinseattle.com/seattle_steaks/trunk/public/" server.errorlog = "/home/joevd/lighttpd/steaks-error.log" server.indexfiles = ( "dispatch.fcgi" ) server.error-handler-404 = "dispatch.fcgi" fastcgi.server = ( ".fcgi" => ( "localhost" => ( "min-procs" => 1, "max-procs" => 1, "socket" => "/tmp/joevd_seattle_steaks", "bin-path" => "/home/joevd/domains/steaklessinseattle.com/seattle_steaks/trunk/public/dispatch.fcgi", "bin-environment" => ( "RAILS_ENV" => "production" ) ) ) ) } $HTTP["host"] =~ "jerrymahan" { server.document-root "/home/joevd/domains/thejerrymahangroup.com/site/public/" server.indexfiles = ( "dispatch.fcgi" ) server.error-handler-404 = "dispatch.fcgi" fastcgi.server = ( ".fcgi" => ( "localhost" => ( "min-procs" => 1, "max-procs" => 1, "socket" => "/tmp/joevd_rails_socket_mahan", "bin-path" => "/home/joevd/domains/thejerrymahangroup.com/site/public/dispatch.fcgi", "bin-environment" => ( "RAILS_ENV" => "production" ) ) ) ) } mimetype.assign = ( ".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" )
On 8/11/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/11/05, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On 8/12/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''m trying to get a site working on TxD with lighttpd. I''ve got a > > > working lighttpd.conf file with another Rails site, so I added a > > > similar entry in it for the new Rails site. But I''m getting a 403 > > > Forbidden error. > > > > > > What could be the cause of that? > > > > Have you made dispatch.fcgi executable? Is there anything in the > > error_log or crash log? > > Yes, it''s executable. And nothing of interest in the lighttpd error > log, the production.log, or fastcgi-crash.log.Note: It''s the steaklessinseattle.com site that''s getting the error.> Here''s the entire lighttpd.conf file > server.pid-file = "/home/joevd/lighttpd/lighttpd.pid" > server.document-root = "/home/joevd/domains/joevandyk.com/public_html/site/" > server.port = 2527 > server.modules = ( "mod_rewrite", "mod_fastcgi" ) > > server.indexfiles = ( "index.html" ) > > > $HTTP["host"] =~ "joevandyk.com" { > server.document-root = "/home/joevd/domains/joevandyk.com/public_html/site/" > server.errorlog = "/home/joevd/lighttpd/joevandyk-error.log" > } > > > $HTTP["host"] =~ "steaklessinseattle" { > server.document-root > "/home/joevd/domains/steaklessinseattle.com/seattle_steaks/trunk/public/" > server.errorlog = "/home/joevd/lighttpd/steaks-error.log" > server.indexfiles = ( "dispatch.fcgi" ) > server.error-handler-404 = "dispatch.fcgi" > fastcgi.server = ( ".fcgi" => > ( "localhost" => > ( > "min-procs" => 1, > "max-procs" => 1, > "socket" => "/tmp/joevd_seattle_steaks", > "bin-path" => > "/home/joevd/domains/steaklessinseattle.com/seattle_steaks/trunk/public/dispatch.fcgi", > "bin-environment" => ( "RAILS_ENV" => "production" ) > ) > ) > ) > } > > > > > > $HTTP["host"] =~ "jerrymahan" { > server.document-root > "/home/joevd/domains/thejerrymahangroup.com/site/public/" > server.indexfiles = ( "dispatch.fcgi" ) > server.error-handler-404 = "dispatch.fcgi" > fastcgi.server = ( ".fcgi" => > ( "localhost" => > ( > "min-procs" => 1, > "max-procs" => 1, > "socket" => "/tmp/joevd_rails_socket_mahan", > "bin-path" => > "/home/joevd/domains/thejerrymahangroup.com/site/public/dispatch.fcgi", > "bin-environment" => ( "RAILS_ENV" => "production" ) > ) > ) > ) > } > > > mimetype.assign = ( > ".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" > ) >
On 8/11/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/11/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On 8/11/05, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On 8/12/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I''m trying to get a site working on TxD with lighttpd. I''ve got a > > > > working lighttpd.conf file with another Rails site, so I added a > > > > similar entry in it for the new Rails site. But I''m getting a 403 > > > > Forbidden error. > > > > > > > > What could be the cause of that? > > > > > > Have you made dispatch.fcgi executable? Is there anything in the > > > error_log or crash log? > > > > Yes, it''s executable. And nothing of interest in the lighttpd error > > log, the production.log, or fastcgi-crash.log. > > > Note: It''s the steaklessinseattle.com site that''s getting the error.Aha, fixed it. I needed to set "Preserve original Host: header" in the Apache Proxy settings (in webmin) to "Yes". What that does, I have no idea.