Have you ever wanted to hide some files that are on your webserver. Perhaps some .inc files that you are including in a php file? Lighttpd comes with a built in parameter to help you out.
url.access-deny = ( "~", ".inc" )
1 comment
To get Lighttpd working follow the instructions on the rails wiki
After you get it working with one host modify your lighttpd.conf and your scgi.yaml files to look something like the files below.
//lighttpd.conf
server.document-root = "C:/apps/app1/public"
server.modules = (
"mod_rewrite",
"mod_redirect",
"mod_access",
"mod_accesslog",
"mod_status",
"mod_scgi")
var.app1 = "C:/apps/app1"
$HTTP["host"] == "www.app1.com" {
server.document-root = var.app1 + "/public"
server.errorlog = var.app1 + "/log/lighttpd-errors.log"
accesslog.filename = var.app1 + "/log/lighttpd-access.log"
static-file.exclude-extensions = ( ".fcgi", ".scgi" )
server.error-handler-404 = "/dispatch.scgi"
scgi.server = ( "dispatch.scgi" => ((
"host" => "127.0.0.1",
"port" => 9999,
"check-local" => "disable"
)) )
}
var.app2 = "C:/apps/app2"
$HTTP["host"] == "www.app2.com" {
server.document-root = var.app2 + "/public"
server.errorlog = var.app2 + "/log/lighttpd-errors.log"
accesslog.filename = var.app2 + "/log/lighttpd-access.log"
static-file.exclude-extensions = ( ".fcgi", ".scgi" )
server.error-handler-404 = "/dispatch.scgi"
scgi.server = ( "dispatch.scgi" => ((
"host" => "127.0.0.1",
"port" => 9998,
"check-local" => "disable"
)) )
}
scgi.debug=0
status.status-url = "/server-status"
status.config-url = "/server-config"
The mime types were left off, but you will need to inculde them in your config.
Here are the scgi.yaml files that you will also need to have as well.
#C:/apps/app1/config/scgi.yaml
:host: 127.0.0.1
:password: ***********
:port: 9999
:logfile: log/scgi.log
:config: config/scgi.yaml
:control_url: druby://127.0.0.1:8999
:disable_signals: true
:env: production
#C:/apps/app2/config/scgi.yaml
:host: 127.0.0.1
:password: ***********
:port: 9998
:logfile: log/scgi.log
:config: config/scgi.yaml
:control_url: druby://127.0.0.1:8998
:disable_signals: true
:env: production
0 comments
Update: I think everything is working now. There will probably be a few hiccups for the first while though.
Update: It seems to be working, but there are still a few bugs to iron out. I need to get blog.ericgoodwin.com working as well as getting my mail server up and running.
At the moment the DNS for ericgoodwin.com is switching over and will now point to my VPS account at rimuhosting.com. If you see this post, it’s been switched over and it is working.
0 comments
So after being on shared hosts for quite a while now, I’ve decided to take the next step and migrate everything to a Virtually Private Server(VPS). After hearing some good reviews about Rimu Hosting on the Rails mailing list, I signed up for their $19.95/m (96MB Ram, 4GB storage, 30GB bandwidth/m) plan. It’s the cheapest plan they offer, and is only $8 more a month than Textdrive’s shared hosting. The only problem with moving to a VPS is now I have to be a sys admin as well. Rimu Hosting staff is quite friendly and will help install a couple things when you sign up, but then you’re pretty much on your own.
So far I have Apache2 installed and running mod_svn with SSL. The next project is to get Apache proxying requests to Lighttpd and then get my blog running off the new server.
0 comments