Configure apache to use domain folders -


i need create configuration apache - point every domain folder named after it. example:

website.com -> /var/www/website.com/www/ www.website.com -> /var/www/website.com/www/ subdomain.website.com -> /var/www/subdomain.website.com/www/ 

www needs linked same folder base domain. tell me please, configuration need? thanks!

update:

i need able add new websites without changing apache configuration, create new folder , work. configuration must wildcard domain possible, www.****.* -> /var/www/****.*/www/ and****.* -> /var/www/****.*/www/

see name-based virtual host documentation more information following directives.

namevirtualhost *:80  <virtualhost *:80> servername www.website.com serveralias website.com documentroot /var/www/website.com/www </virtualhost>  <virtualhost *:80> servername subdomain.website.com documentroot /var/www/subdomain.website.com/www </virtualhost> 

if using apache 2.4 (above 2.2), replace namevirtualhost *:80 listen 80

if need more dynamic, visit http://httpd.apache.org/docs/2.2/vhosts/mass.html


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -