Port-based vhosts
Listen 80 Listen 8080 # for php LoadModule php4_module C:/PHP/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php .php3 .phtml .inc AddType application/x-httpd-php-source .phps <VirtualHost _default_:8080> DocumentRoot "C:/HOME/jiangxin/work/web/office/wwwroot" DirectoryIndex index.php index.html index.htm php_value include_path ".;C:/HOME/jiangxin/work/web/office/wwwroot" <Directory C:/HOME/jiangxin/work/web/office/wwwroot> Options None AllowOverride None order deny,allow allow from all <FilesMatch "\.php$"> php_value auto_prepend_file "inc/my_header_inc.php" php_value auto_append_file "inc/my_footer_inc.php" </FilesMatch> <FilesMatch "^pop_.*\.php$|_inc\.php$|_js\.php$|^mgr_.*\.php$|^passwd.php$"> php_value auto_prepend_file none php_value auto_append_file none </FilesMatch> </Directory> ... ... # Alias /downloads /www/downloads <Directory /www/downloads> Options None AllowOverride None order deny,allow allow from all </Directory> Alias /service C:/HOME/jiangxin/work/web/office/wwwroot/product </VirtualHost> <VirtualHost _default_:*> DocumentRoot "C:/HOME/jiangxin/work/web/home" #DirectoryIndex index.html index.htm </VirtualHost>
name-based vhosts
... Port 80 ServerName server.domain.tld NameVirtualHost 111.22.33.44 <VirtualHost 111.22.33.44> DocumentRoot /www/domain ServerName www.domain.tld ... </VirtualHost> <VirtualHost 111.22.33.44> DocumentRoot /www/subdomain ServerName www.sub.domain.tld ... </VirtualHost>
IP-based vhosts
... Port 80 ServerName server.domain.tld <VirtualHost 111.22.33.44> DocumentRoot /www/domain ServerName www.domain.tld ... </VirtualHost> <VirtualHost 111.22.33.55> DocumentRoot /www/otherdomain ServerName www.otherdomain.tld ... </VirtualHost>
Mixed name-/IP-based vhosts
Port 80 ServerName server.domain.tld NameVirtualHost 111.22.33.44 <VirtualHost 111.22.33.44> DocumentRoot /www/domain ServerName www.domain.tld ... </VirtualHost> <VirtualHost 111.22.33.44> DocumentRoot /www/subdomain1 ServerName www.sub1.domain.tld ... </VirtualHost> <VirtualHost 111.22.33.44> DocumentRoot /www/subdomain2 ServerName www.sub2.domain.tld ... </VirtualHost> <VirtualHost 111.22.33.55> DocumentRoot /www/otherdomain1 ServerName www.otherdomain1.tld ... </VirtualHost> <VirtualHost 111.22.33.66> DocumentRoot /www/otherdomain2 ServerName www.otherdomain2.tld ...
Copyright © 2006 WorldHello 开放文档之源 计划 |