I would like to create a registration form that creates subdomains (still on the local host), but I have some problems. I know how to create subdomains by writing, for example, in vhosts:
<VirtualHost *:80> ServerAdmin webmaster@dummy-host.hleclerc-PC.ingenidev DocumentRoot "C:/wamp/www/something/" ServerName localhost ServerAlias something.localhost ErrorLog "logs/error.log" CustomLog "logs/access.log" common </VirtualHost>
And put this line in the hosts:
127.0.0.0 something.localhost
It works, but I want that when registering a new subdomain (for example: other), when I try to open other.localhost, it opens the specified folder (../www/other/), I tried it in vhosts with "ServerName *. localhost "," ServerName localhost "," ServerAlias ββ* .localhost "," ServerAlias ββlocalhost "and on hosts" 127.0.0.1 * .localhost "with all permutations, but none of them worked for me. I thought about this, that when registering, I put a new block in vhosts with optimal data, but I do not think this is a very safe / possible / or best way to do it.
Hope someone can help me!
Thanks in advance!
source share