Get organized!

Here is a very nice trick that you can use to make your own subdomains on… localhost. I know, it sound difficult as hell but, in fact, it’s easy as hell :D

In this mini-tutorial i assume that you use Xampp, but you can use with any other *AMP configuration, on any platform (Windows, Mac, Linux, whatever). Also, because i don’t own a static IP (my ISP is “kind” enough to change my IP every single time when i power up my PC), i use a dynamic DNS service. Ofcourse, you are not restrained to use this service, you can find plenty of similar sites, but i use this and i’m happy with it :P

Anyhow, let’s begin.

Step 1. Edit httpd.conf

If you use Xampp, and you installed with default settings, you will find httpd.conf in C:\xampp\apache\conf. On httpd.conf you need to find Include conf/extra/httpd-vhosts.conf. If this line have a “#” char, just remove.

Step 2. Edit conf/extra/httpd-vhosts.conf.

This is the fun part. Just add at the end of the file this lines:


	DocumentRoot G:/htdocs/mysubdomain
	ServerName mysubdomain.my_domain.selfip.com

Then save and restart your apache server. Guess what? Now you have a subdomain!

Step 3. Assets folder

In a previous article i showed you how to put all libraries in same folder to avoid too many folder. Of course, this is fine when you don’t use subdomains. But what to do when you use? Well.. You edit httpd.conf !

First of all you need to be sure that Mod_alias.so is loaded. Find LoadModule alias_module modules/mod_alias.so and be sure it doesn’t have any “#” in front. Then add this at the end of the document:

AliasMatch ^/assets(.*) G:/htdocs/assets$1

Don’t forget to save and restart your server.

Next step is… There is no next step! You are ready to start/resume your regular work :P

Enjoy!

Links of interest

  • WordPress 2.7 Final is out. When you upgrade, if with no reason your blog display blank pages (both on admin and front end), disable all plugins. Actually it’s recommended that you disable all plugins BEFORE any update attempt. I know this because i didn’t disable any plugins :D
  • Learn how to do a mini shopping cart using a lil’ bit of scriptaculous and prototype.
  • Improve your forms aspect and behaviour.
  • Create an amazing music player with mouse gestures and keyboard control using jQuery
  • Sitepoint has released a new book in series of “The principle….” : The Principles Of Successful Freelancing. You can see a sample article here.
  • Even if it’s not related to web development in any way, take a look at this gorgeous dual monitor wallpapers

WordPress 2.7 final to be released

If you use wordpress, you may be happy. The 2.7 will go final in two days from now. The good news is this: old browsers are not supported anymore. Yes, IE6 is included in “old browser” category!

I already update this blog to 2.7 RC because i just messed up feed.

What i did? Well.. In my “have more money than Bill Gates” race, i wanted to put some ads in RSS feeds. I set up this in adsense account but… The problem is that i screw things up :( Ads are displayed, but in reader you can see a small excerpt. I spend over two hours to find a fix (including removing the ads!) but with no luck. So… If you know how to fix and you want to help me, be my guest!