Dynamic Virtual Hosting Configuration

<VirtualHost *:80> ServerAdmin admin@local.dev ServerName local.dev ServerAlias *.local.dev ErrorLog "logs/%0-error.log" CustomLog "logs/%0-access.log" common DocumentRoot "vhosts" VirtualDocumentRoot "vhosts/%0/public" <Directory "vhosts"> AllowOverride All Require local </Directory> </VirtualHost>
This configuration allows all subdomains calls go to a folder without having to restart or add more configurations for each sub domain.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.