...using Ruby and Rails, I kept finding my brain stretched just a little bit by having to learn new syntax at the same time as getting comfortable with new paradigms. It was taking too long to switch my brain into a different mode, and that made it very hard for me to persuade customers to take the plunge in all good conscience.
Saturday, November 28, 2009
This, by Jeremy Meyer, summarises how I felt about learning Ruby and Rails:
Sunday, March 29, 2009
Virtual hosts & Wordpress
Today I've been tinkering around with the web site hosting I provide from my Mac Mini. I added a a couple of VirtualHost directives to my Apache configuration - one to handle my 'normal' site and another to handle my WordPress installation. I now also have two DNS domains (provided by dyndns.com) that route visitors to these two sites. I set the WordPress one up for my wife to use to log her experiences and thoughts as she trains to be a careers counsellor.
I also re-configured the way I back up important data on my Mac. Basically, the data consists of my wife and I's personal documents, our iTunes music collection, our iPhoto albums and our videos (of our wedding, for example). The OS is OS X Tiger and I up until now I had been using SilverKeeper from Lacie. I noticed today however, that it wasn't backing everything up anymore - some of the rules I set up seemed to have disappeared. This alarmed me somewhat so I decided to got hunting for some alternative freeware. What I found was backuplist+. It is basically a GUI for the rsync command-line tool. I'm still in the proces of setting it up but it looks promising.
I also re-configured the way I back up important data on my Mac. Basically, the data consists of my wife and I's personal documents, our iTunes music collection, our iPhoto albums and our videos (of our wedding, for example). The OS is OS X Tiger and I up until now I had been using SilverKeeper from Lacie. I noticed today however, that it wasn't backing everything up anymore - some of the rules I set up seemed to have disappeared. This alarmed me somewhat so I decided to got hunting for some alternative freeware. What I found was backuplist+. It is basically a GUI for the rsync command-line tool. I'm still in the proces of setting it up but it looks promising.
Friday, March 20, 2009
FTP Attack!
It looks like someone (or something) has been trying to access my FTP site. I was hosting from home (even thought there is nothing remotely interesting on it and I just happened to spot lots of messages like this
[...] pure-ftpd: (?@XXX.XX.X.XXX) [ERROR] Too many authentication failures
in my Mac's console.log file. I really should check that log more often. Anyway, they kept failing but it seemed to be a 'brute force' attack so took the safest option for now and just turned my FTP daemon off. Stitch that.
[...] pure-ftpd: (?@XXX.XX.X.XXX) [ERROR] Too many authentication failures
in my Mac's console.log file. I really should check that log more often. Anyway, they kept failing but it seemed to be a 'brute force' attack so took the safest option for now and just turned my FTP daemon off. Stitch that.
Tuesday, March 10, 2009
Preventing Apache from serving up directory contents
I've found the answer to this question (I previously posted it here). The options are laid out here. Essentially, you need to either change the file permissions for the directory, remove the Indexes directive or add an index.html file.
Update: This is the theory alright. However, I couldn't get it to work and I've found out why! :)
I ordered a book on Apache (after some deliberation - I only wanted to buy one) and it's excellent, so I'll mention it here. It's the O'Reilly Apache Cookbook (2nd Ed) and has lots of really good advice in. It's not a reference manual, but I figure I can check the syntax of Apache directives (and the like) online easily enough.
So, cut to the chase Ben. I was finding that my Indexes directives seemed to be ignored. For that fact, lots of things seemed to have no effect whatsoever to the way Apache was serving my TextPattern and WordPress pages. About the only effects I was able to get were the result of changing the file permissions of the pages was trying to serve, and that wasn't what I was attempting to do.
What I really couldn't get my head around was the Directives in my .htaccess files were being ignored. The magic Cookbook pointed me in the right direction though: my httpd.conf file was specifically preventing .htaccess files from affecting anything with the directive AllowOverride None. Whoops. Once I switched that from None to All WordPress and TextPattern started working as expected. And there was peace in my head.
This is what happens when
Update: This is the theory alright. However, I couldn't get it to work and I've found out why! :)
I ordered a book on Apache (after some deliberation - I only wanted to buy one) and it's excellent, so I'll mention it here. It's the O'Reilly Apache Cookbook (2nd Ed) and has lots of really good advice in. It's not a reference manual, but I figure I can check the syntax of Apache directives (and the like) online easily enough.
So, cut to the chase Ben. I was finding that my Indexes directives seemed to be ignored. For that fact, lots of things seemed to have no effect whatsoever to the way Apache was serving my TextPattern and WordPress pages. About the only effects I was able to get were the result of changing the file permissions of the pages was trying to serve, and that wasn't what I was attempting to do.
What I really couldn't get my head around was the Directives in my .htaccess files were being ignored. The magic Cookbook pointed me in the right direction though: my httpd.conf file was specifically preventing .htaccess files from affecting anything with the directive AllowOverride None. Whoops. Once I switched that from None to All WordPress and TextPattern started working as expected. And there was peace in my head.
This is what happens when
- you get a decent book and the time to read it, and
- you wake at 6am and can't sleep, and it turns out your brain is very lucid and alive to problem-solving at this time!
Tuesday, March 3, 2009
Arsing around with Apache
I'm currently looking for some decent reference material on Apache 2, ideally an actual book I can carry around. I've been fiddling around hosting my own WordPress and TextPattern engines with mixed success.
The main difficulties I've been having are:
1. Setting the DirectoryIndex directive in the httpd.conf or in individual .htaccess files doesn't seem to do anything.
2. WordPress just doesn't frickin' work properly. Strangely the admin pages do work, but the normal blogging pages only work in certain circumstances. I wrestled with it for ages and came to the conclusion that is was something to do with file permissions.
3. Knowing where to start with developing a 'web presence'.
4. PHP pages are showing as text when served from my web server (and they were working a while ago!)
The answer to #4 is that I had two copies of the httpd process running - the Apache that comes with OS X was running when it shouldn't have been. I could have sworn I'd disabled that. With just the Apache 2.2 one running a test PHP page is served correctly. Textpattern PHP files are still wrong though. And the solution to that one is that the owner has to be www rather than me, which it was set to when I downladed the Textpattern distro. Strange, and a bit of a pain to have to set the owner for everything. This doesn't seem to happen for plain HTML files. I suppose it perhaps makes some sort of sense: Apache needs to execute a PHP file and it's running as www, but www doesn't have execute rights on that file.
Got my email read out in episode 20 of the Rissington Podcast. And they gave some good advice on my questions about hosting too. Much happiness ensued.
Anyway, here are the Apache-y things I'm wondering about:
* After you've edited httpd.conf do you always need to restart Apache?
* After you've added or edited a .htaccess file do you need to restart Apache?
* What account/user does the Apache HTTP daemon run under by default on OS X?
* Every time I add new pages to my site do I have to save the files with specific permissions so that Apache can serve them properly?
The main difficulties I've been having are:
1. Setting the DirectoryIndex directive in the httpd.conf or in individual .htaccess files doesn't seem to do anything.
2. WordPress just doesn't frickin' work properly. Strangely the admin pages do work, but the normal blogging pages only work in certain circumstances. I wrestled with it for ages and came to the conclusion that is was something to do with file permissions.
3. Knowing where to start with developing a 'web presence'.
4. PHP pages are showing as text when served from my web server (and they were working a while ago!)
The answer to #4 is that I had two copies of the httpd process running - the Apache that comes with OS X was running when it shouldn't have been. I could have sworn I'd disabled that. With just the Apache 2.2 one running a test PHP page is served correctly. Textpattern PHP files are still wrong though. And the solution to that one is that the owner has to be www rather than me, which it was set to when I downladed the Textpattern distro. Strange, and a bit of a pain to have to set the owner for everything. This doesn't seem to happen for plain HTML files. I suppose it perhaps makes some sort of sense: Apache needs to execute a PHP file and it's running as www, but www doesn't have execute rights on that file.
Got my email read out in episode 20 of the Rissington Podcast. And they gave some good advice on my questions about hosting too. Much happiness ensued.
Anyway, here are the Apache-y things I'm wondering about:
* After you've edited httpd.conf do you always need to restart Apache?
* After you've added or edited a .htaccess file do you need to restart Apache?
* What account/user does the Apache HTTP daemon run under by default on OS X?
* Every time I add new pages to my site do I have to save the files with specific permissions so that Apache can serve them properly?
Tuesday, December 16, 2008
Subscribe to:
Posts (Atom)