Digital Camera Magazine forums hacked?
Posted: January 27th, 2009 | Author: James | Filed under: The Outside World | Tags: email, hacked, magazine | 4 Comments »Looks like the forums for Digital Camera magazine have been hacked. Just received this in my email…
An administrator of Digital Camera Magazine Community has sent the following email
to all users in the Everyone forum group.Sent From: admin
Subject: Attention faggots
__________________________________Your retarded administrators don’t understand that repairing damage is meaningless unless you first fix the problem. This forum is now 4chan’s bitch, and we shall do with it as we please. Since your administrators are completely incompetent we have decided to ban them, as well as change their passwords; we’re sure you won’t mind. We went easy on you this first time, prepare for the worst.
-Anonymous
[Update] It took a few days but the site eventually did come back up with this explanation.
Welcome back to the site. You may be aware that we recently closed dcmag.co.uk following a malicious attack from unknown users. These users accessed an administration interface that allowed them to send an offensive email to our registered users. The DCMag team apologises for any offence this may have caused you.
Subscribers to the print magazines Digital Camera and Digital Camera World do not have their banking details and subscriber information held on this site. Your site registration passwords remain encrypted, but if you would like to change your password here’s how to change your password.
At least nothing too sensitive fell into the hands of the attackers. Hopefully this will teach Digital Camera Magazine a lesson.
Installing Railo 3 on Tomcat 6 via Apache 2 on Ubuntu 8.04
Posted: January 22nd, 2009 | Author: James | Filed under: Web Development | Tags: apache, cfml, coldfusion, linux, mod_jk, railo, tomcat, ubuntu | 20 Comments »Well that headline is a bit of a mouthful, but i figured if this was something I was attempting to do then there was a good chance that others were attempting the same thing – and what I really could have done with is a guide. So here’s that guide.
First of all I started with a default install of Ubuntu Server 8.04, the latest LTS release. There’s no reason why this shouldn’t work on 8.10 though.
Setting Up Tomcat 6
First things first, install Java.
sudo apt-get install sun-java6-jdk
That should all without a hitch and the next step is to get Tomcat installed. The version available through is apt is version 5.5 and I wanted to use the latest release so after logging in to the server download the latest (6.0.18 at this time) by executing
wget http://apache.hoxt.com/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.tar.gz tar xvzf apache-tomcat-6.0.18.tar.gz
Next we need to move Tomcat somewhere permanent.
sudo mv apache-tomcat-6.0.18 /usr/local/tomcat
The next thing to do is set Tomcat to automatically start when the server starts (plus the script makes it easier to start and stop Tomcat). Start up your editor of choice.
sudo nano /etc/init.d/tomcat
And paste in the following script (which I got originally from HowToGeek.com)
# Tomcat auto-start # # description: Auto-starts tomcat # processname: tomcat # pidfile: /var/run/tomcat.pid export JAVA_HOME=/usr/lib/jvm/java-6-sun case $1 in start) sh /usr/local/tomcat/bin/startup.sh ;; stop) sh /usr/local/tomcat/bin/shutdown.sh ;; restart) sh /usr/local/tomcat/bin/shutdown.sh sh /usr/local/tomcat/bin/startup.sh ;; esac exit 0
The script also need to be made executable and hooked up to the startup folders.
sudo chmod 755 /etc/init.d/tomcat sudo nano /etc/init.d/tomcat sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat
Tomcat should now be up and running!
Railo
To install Railo we first need to get the Railo custom version and copy all of the files into the Tomcat lib directory.
wget http://www.railo-technologies.com/railo/remote/download/3.0.1.000/custom/all/railo-3.0.1.000-jars.tar.gztar zxvf railo-3.0.1.000-jars.tar.gzsudo mv railo-3.0.1.000-jars/* /usr/local/tomcat/lib
The next step is to get Railo and Tomcat working together. I’ve assumed that you’re only using Tomcat for CFML processing so these instructions only cover installing Railo on a server wide basis rather than being site specific.
Open up the web config file
sudo nano /usr/local/tomcat/conf/web.xml
and append the following inside the <web-app> element.
<servlet>
<servlet-name>CFMLServlet</servlet-name>
<servlet-class>railo.loader.servlet.CFMLServlet</servlet-class>
<init-param>
<param-name>configuration</param-name>
<param-value>{web-root-directory}/WEB-INF/railo/</param-value>
<description>Configuraton directory</description>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfc</url-pattern>
</servlet-mapping>
Inside the <welcome-file-list> element insert the following
<welcome-file>index.cfm</welcome-file> <welcome-file>index.cfml</welcome-file>
This tells Tomcat what files to process and what to do with them.
Apache
Next we need Apache. Originally I had installed this by selecting the LAMP stack while installing Ubuntu but if you missed that step then go for
sudo apt-get install apache2
Connecting Apache and Tomcat
There are various ways to connect Apache and Tomcat, but we’ll be using mod_jk which you can install on Ubuntu by typing in
sudo apt-get install libapache2-mod-jk
To specify the connection between Apache and Tomcat we set up a file called workers.properties and list the different connectors. Create the file in the Apache directory
sudo nano /etc/apache2/workers.properties
and paste in the following
worker.list=default worker.default.port=8009 worker.default.host=localhost worker.default.type=ajp13 worker.default.lbfactor=1
We then tell apache where this file is by adding the following to your /etc/apache2/httpd.conf
# Mod_jk settings JkWorkersFile workers.properties DirectoryIndex index.html index.htm index.cfm index.cfml
Setting Up A Site
To use Railo on a website we need to configure it in both Apache and Tomcat. In Tomcat’s server.xml (/usr/local/tomcat/conf/server.xml if you’re following my instructions) add the following (you can add many of these if you need to set it up for each application)
<Host name="your.url.com" appBase="/var/www/vhosts/yoursite">
<Context path="" docBase=""/>
</Host>
Finally we add the following to your site’s apache vhost config (most likely in /etc/apache2/sites-available)
JkMount /*.cfm default
This tells mod_jk to use the default connector (as specified in the workers.properties file) whenever it encounters a file ending in .cfm. By setting it up this way we can still use apache to server static files like images, css and js (or even run another language like php side by side with ColdFusion)
Last thing to do is to drop some Coldfusion into your website and check that everything is working.
New Open Source Projects
Posted: January 11th, 2009 | Author: James | Filed under: Web Development, Work | Tags: open-source, project management, web app | No Comments »Two of the projects i worked on at oceanseventy, a project management application and a photo management / database have been made open source. You can find epicentr and efstop over at Google code.
Epicentr is in better shape at the moment – both applications had to be stripped of some proprietary code that couldn’t be open sourced – but i wouldn’t recommend installing it until the initial release.
The great thing about these projects going open source is that myself and the other contributors can finally move them in the direction we want to and not be hampered by the ‘business’ needs. Plus I can continue to work on them now that i’m moved job.
Hosting Migration to Amazon EC2
Posted: January 11th, 2009 | Author: James | Filed under: Web Development, Work | Tags: amazon, aws, ebs, ec2, fasthosts, hosting | 2 Comments »As I mentioned previously, we (oceanseventy) decided that recently to take advantage of the slowdown around Christmas and start to migrate our hosting set up away from a Fasthosts dedicated server.
For 2 years we’d been using a Fedora 6 box which had been running fine, but it was becoming difficult to keep the OS up to date given Fedora’s habit of ignoring previous releases fairly quickly. Other issues, like the fact that there was a single hd in the machine which could potentially die at any time and cause much pain, prompted the desire to move everything to something more robust, flexible and easy to backup. Enter Amazon EC2.
Fedora was ditched in favour of Ubuntu 8.04 – the latest LTS release – and within an hour we had set up a small instance in the Euro availability zone. The doc’s for EC2 are excellent and take you through the process. An Elastic IP was attached to the instance to ensure we could maintain the ip should the server ever go down.
We also attached a 120gb Elastic Block Store instance, mounted at /var/www to make it easy to take all data easily to another instance should the need arise. Backups are handled with the AMI and EC2 tools. Nightly the instance is bundled and stored on S3 and nightly a snapshot is take of the EBS block as well.
So far the instance has been rock solid reliable and much faster than the old Fasthosts dedicated box we had. EC2 is exactly what anyone hosting websites need at the moment – no tie-in to any physical hardware and the flexibility to scale your hardware as required.
I’ve seen a lot of criticism about hosting web sites on EC2 but almost all of the issues I’ve seen are no longer relevant as Amazon have taken steps to improve EC2 and add critical features (like persistent external IP addresses).
Really glad I got the opportunity to implement this as my last act at oceanseventy. I’m definitely and EC2 advocate now and hopeful the skills i’ve learned will help my in my new position at STV. Hopefully i’ll be able to use EC2 for my startup project as well.
links for 2009-01-08
Posted: January 9th, 2009 | Author: James | Filed under: Uncategorized | No Comments »-
Open source virtualisation solution
-
Open Source Framework for Multi-Scale Images and Zoomable User Interfaces (ZUI)