Get organized!
11 DecHere 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
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
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:
<VirtualHost *:80> DocumentRoot G:/htdocs/mysubdomain ServerName mysubdomain.iamntz.selfip.com </VirtualHost>
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
Enjoy!


Very useful tutorial for users wich want to install more platforms on their computer.
This is a good trick thanks
[...] urmă cu ceva timp am scris despre cum să faci un folder pentru fișierele comune și să incluzi de acolo ce ai nevoie. [...]