A guy, a blog and the internet
WebWeb
Anything web related
Local development – multiple vhosts
Jul 22nd
As with alot of devs out there, I have a couple of virtual hosts setup. It is rather annoying to keep updating the /etc/hosts file. I came across “42foo: all the virtual hosts you need for your web development” which has helped alot. But this was not enough, the virtual hosts are still static, then I found “Dynamically Configured Mass Virtual Hosting“.
So now I have the following setup:
/etc/dnsmasq.conf
no-resolv server=<DNSSERVER> address=/.local/<DEVSERVERIP> no-hosts
/etc/apache2/conf.d/multi_vhost (on the devserver)
# get the server name from the Host: header UseCanonicalName Off # this log format can be split per-virtual-host based on the first field LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon CustomLog /var/log/apache2/vhost_access_log vcommon # include the server name in the filenames used to satisfy requests VirtualDocumentRoot /var/www/%0/ <Directory /var/www/> AllowOverride All Order allow,deny Allow from all </Directory>
Apache requires the mod_vhost_alias module to be loaded.
And this is it, all that is needed now is to have a symlink/directory in /var/www/ with the name of the virtualhost pointing to the document root of the dev site.
EG: /var/www/test.local -> /home/<user>/Development/test/webroot/
So now no more editing multiple files, all I need is to create a symlink and sorted
P.S. I did find that the Avahi daemon was causing issues see Bug #80900…
To disable the Avahi daemon:
sudo invoke-rc.d avahi-daemon stop sudo update-rc.d -f avahi-daemon remove
UPDATE: I needed to add the directory clause to multi_vhost as I needed to use .htaccess files ![]()
UPDATE 2: There was also an issue with mod_rewrite (Request exceeded the limit of 10 internal redirects due to probable configuration error.) This was only happening to sites with a .htaccess. The solution was to add:
RewriteBase /
RE: Hating Microsoft
Jul 16th
For those of you Microsoft Zealots out there read the following: Russell Coker: Hating Microsoft it might explain a few things
Now STFU :p
Microsoft Tax– Howto get a refund
Jun 29th
Was going through my rss feeds and found the following on Planet Ubuntu: http://simos.info/blog/archives/1000
I now can’t wait till I get a new PC
Hopefully this helps others out there who don’t need/want windows, there are other alternatives: http://distrowatch.com
Internet or lack thereof
Jun 9th
So I found a nice internet speed tester… Dunno how acurate it is but it shows just how crap our internet is…
At home using iBust:
And at work using ADSL:
Both of these are supposed to be 1Mb/s lines (not 100% sure about work I think it’s actually a 4Mb/s line)
Just shows how bad the internet is here
Hopefully by 2010 as Telkom are advertising we will have better access…
MySQL group_concat not returning all data.
May 30th
So working on a project for work, and it was not behaving as expected. I was selecting all the ID’s from a table that was linked to a couple of other tables, it turns out that it wasn’t returning all the id’s as expected as there is a limit on the amount of data that GROUP_CONCAT will return. MySQL Manual – GROUP_CONCAT
Well instead of using GROUP_CONCAT I’m now selecting the id’s individually, and this is now working.
Also there seems to be a limit on the number of items you can have in a IN clause: SELECT * FROM table WHERE field IN (xxx,xxx,xxx) so I’ve had to split these into 1000 peice chunks.
All seems to be working now after that, we’ll see how it goes…
Git colors
Jan 2nd
I’ve been using Git for a while now and am enjoying it over SVN. Especially the fact that it’s distributed.
Well recently I was having an issue with the color output:
<config ~/.gitconfig> [color] ui = auto </config>
After enabling colors I was getting the following:
# ESC[31mmodified: cms/config.phpESC[m
And then I found an entry on the GitFaq which fixed the issue
<config ~/.gitconfig> [core] pager = less -FXRS </config>
Hope this helps someone else having the same issue.
Installing Jabber on Debian Etch
Sep 26th
Well I just finished getting Jabber installed and working on my local network.
Basically I just followed the first link to get the server up, and the second to get a web client running.
I did have a couple of issues with the web client, but I will try to document them at another date… (well I need to reinstall the server soon)
Now just to get jabber to talk to the outside world
Taking a stand to promote OpenID
Sep 22nd
I’ve been using OpenID for a while now, and have it enabled it on this site…
I was reading a post on Planet Debian and that is why I’m writing this
As Aaron B. Hockley said in this blogentry: It’s a win for the blog owner, since it means the comments have a “real” identity behind them.
I’ve been quite happy so far with it, it also helps with usernames, for example I only need to remember one URL and a password, no more trying to think of new usernames when the one you always use is taken.
If more websites would start using OpenID the world would be a better place, well my world at least :p
Well if you need help setting up an OpenID account drop me a message
Memories and plugins
Aug 15th
Well as I’m uploading pictures to Flickr, I am reminded of various events
Like the birth of Catelyn (Ok lucky for all of you I left the camera in the car, so no pics of the C Section :p )
The first picture after we got home
Well enough with the trip down memory lane
I finally found a nice plugin for WordPress that can pull in my Flickr photos, not only does it create a flickr page and widget (see the pics on the side), but when you add/edit a post you can click the flickr button and insert pictures directly into your posts
For those interested: the link to Flickr Photo Album for WordPress : tan tan noodles
Weird Firefox Problem
Aug 11th
Well it seems like I’m not the only one, I have this issue with Firefox (Iceweasel for the Debian folk) where after a while FF hangs (maybe it’s low self esteem, you’d think IE would do so :p). I’m still not 100% sure but I thik this is related to flash or maybe even some rouge javascript.
I say I’m not the only one cause on Planet Debian I saw that Weird Firefox Problem
One of the comments on his page suggests running: strace -p `pidof firefox`
Hopefully I remember the next time it happens
Happy hunting!!







