不同文件夹中的apache域和子域
我需要设置apache配置,以便:不同文件夹中的apache域和子域,apache,.htaccess,Apache,.htaccess,我需要设置apache配置,以便: domain.com&www.domain.com指向文件夹/var/www/domain.com/root 其他子域*.domain.com指向文件夹/var/www/domain.com/other 我已经有了这个解决问题1的配置。 要使步骤2起作用,我需要更改什么 <VirtualHost 10.10.10.10:80 > ServerName domain.com DocumentRoot /var/www/domain.c
domain.com
&www.domain.com
指向文件夹/var/www/domain.com/root
*.domain.com
指向文件夹/var/www/domain.com/other
<VirtualHost 10.10.10.10:80 >
ServerName domain.com
DocumentRoot /var/www/domain.com/root
ServerAlias www.domain.com
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
AddType application/x-httpd-php-source .phps
</VirtualHost>
ServerName域名.com
DocumentRoot/var/www/domain.com/root
ServerAlias www.domain.com
AddType应用程序/x-httpd-php.php.php3.php4.php5.phtml
AddType应用程序/x-httpd-php-source.phps
最好的,
FA添加:
<VirtualHost 10.10.10.10:80 >
ServerName subdomain.domain.com
ServerAlias *.domain.com
DocumentRoot /var/www/domain.com/other
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
AddType application/x-httpd-php-source .phps
</VirtualHost>
ServerName subdomain.domain.com
ServerAlias*.domain.com
DocumentRoot/var/www/domain.com/other
AddType应用程序/x-httpd-php.php.php3.php4.php5.phtml
AddType应用程序/x-httpd-php-source.phps
在已有的VirtualHost
容器之后