Forum: Ruby on Rails Lighttpd Config

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E6b62894a17062e2de4be34fbb84cada?d=identicon&s=25 joelbywan (Guest)
on 2006-05-26 22:47
(Received via mailing list)
Hi this is a newbie question that should be easy enough for somebody to
answer, I'm horrible at this web server configuration stuff.

I'm running Rails on Fedora Core 5 with Lighttpd and MySql.  I've
created a
rails application 'logapp'.   I have an entry in /etc/hosts like...

127.0.0.1  logapp

So when I point my browser to 'logapp' I get my app.

When I point my browser to the IP of the server (say 208.256.152.228)  I
get
the default Lighttpd index page.

Now I want to move my app so that others on the network can access it by
going to something like http://208.256.152.228/logapp, but I cannot
figure
this out!!  It's got to be rather simple.

Here's my Lighttpd.conf


server.port = 80
server.pid-file = "/tmp/test_lighttpd.pid"

server.modules = ( "mod_redirect", "mod_access", "mod_fastcgi",
"mod_accesslog", "mod_simple_vhost" )

server.document-root = "/srv/www/lighttpd/"
server.indexfiles = ( "index.php", "index.html" )
accesslog.filename = "/var/log/lighttpd/access_log"
server.errorlog = "/var/log/lighttpd/error_log"

# Start of logapp vhost
$HTTP["host"] == "logapp" {
  server.document-root = "/home/jturnbull/logapp/public/"
  accesslog.filename = "/home/jturnbull/logapp/log/access.log"
  server.indexfiles = ( "dispatch.fcgi", "index.html" )
  server.error-handler-404 = "/dispatch.fcgi"

  # rails stuff
  #### fastcgi module
  fastcgi.server = (
    ".fcgi" => (
      "logapp" => (
        "socket" => "/tmp/logapp1.socket",
        "bin-path" => "/home/jturnbull/logapp/public/dispatch.fcgi",
        "min-procs" => 1,
        "max_procs" => 2,
        "bin-environment" => ("RAILS_ENV" => "production")
      )
    )
  )
}
# End of sceduler vhost

# mimetype mapping
etc.


--
View this message in context:
http://www.nabble.com/Lighttpd+Config-t1689030.html#a4583425
Sent from the RubyOnRails Users forum at Nabble.com.
6076c22b65b36f5d75c30bdcfb2fda85?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2006-05-27 02:05
(Received via mailing list)
On May 26, 2006, at 1:32 PM, joelbywan wrote:

> 127.0.0.1  logapp
> figure
>
> server.document-root = "/srv/www/lighttpd/"
> server.indexfiles = ( "index.php", "index.html" )
> accesslog.filename = "/var/log/lighttpd/access_log"
> server.errorlog = "/var/log/lighttpd/error_log"
>
> # Start of logapp vhost
> $HTTP["host"] == "logapp" {
Try this line instead of the above line:

    $HTTP["url"] =~ "^/logapp/" {

>         "socket" => "/tmp/logapp1.socket",
> # mimetype mapping
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails


-Ezra
E6b62894a17062e2de4be34fbb84cada?d=identicon&s=25 joelbywan (Guest)
on 2006-05-30 15:05
(Received via mailing list)
Thanks Ezra.  I really thought that was going to work, but I'm still
getting
a 404 at 'http://208.256.152.228/logapp'.  Any other ideas?

Thanks Again,
Joel
--
View this message in context:
http://www.nabble.com/Lighttpd+Config-t1689030.html#a4626464
Sent from the RubyOnRails Users forum at Nabble.com.
This topic is locked and can not be replied to.