I have downloaded Lighttpd for Windows from
http://wlmp.dtech.hu/down_lighty.php?lang=en
But I dont really know how to setup to run Rails apps.
I have downloaded Lighttpd for Windows from
http://wlmp.dtech.hu/down_lighty.php?lang=en
But I dont really know how to setup to run Rails apps.
Hi Vapor
The recommended approach for Windows is Apache 2.2 x + a pack of
mongrels…
HTH
CCH
On Oct 29, 4:18 pm, “Vapor …” [email protected]
In case you’re still interested:
I assume you have already, but if not
now
gem install scgi_rails-0.4.3.gem
say yes if it asks if you want to install dependencies
install lighttpd
copy c:\lighttpd\etc\lighttpd.conf to your rails app’s config
folder. edit the config file as shown below. Replace c:/railapps
with path to your rail application, e.g., c:/rorapps/myapp. I’m only
showing the parts you need to change.
server.modules = (
“mod_rewrite”,
“mod_redirect”,
“mod_access”,
“mod_accesslog”,
“mod_status”,
“mod_scgi”)
server.document-root = “C:/RailsApp/public”
static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi”, “.scgi” )
server.error-handler-404 = “/dispatch.scgi”
scgi.server = ( “dispatch.scgi” => ((
“host” => “127.0.0.1”,
“port” => 9999,
“check-local” => “disable”
)) )
scgi.debug=0
status.status-url = “/server-status”
status.config-url = “/server-config”
server.port = 3000 # or whatever you like
what this part
server.error-handler-404 = “/dispatch.scgi”
scgi.server = ( “dispatch.scgi” => ((
“host” => “127.0.0.1”,
“port” => 9999,
“check-local” => “disable”
)) )
does is tell the lighttpd server to handle 404 file not found error by
handing it off to the scgi service which will serve your rail app.
c:\lighttpd\sbin\lighttpd.exe -f config/lighttpd.conf
scgi_service
now you should be abe to access your app
sorry I skipped a step
5.5) execute this from commandline in your rail app’s folder
scgi_ctrl config -S
this creates the necessary scgi.yaml file in your config folder.
You can then create a batch file like this
@echo off
echo Stopping lighty…
c:\lighttpd\sbin\process.exe -k lighttpd.exe
echo Starting lighty…
c:\lighttpd\sbin\lighttpd.exe -f config\lighttpd.conf
echo Stopping SCGI_service…
c:\lighttpd\sbin\process.exe -k ruby.exe
echo Starting SCGI_service…
scgi_service
in your rail app’s folder and execute it to get the whole thing going.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs