add domain in apache in linux system

in httpd.conf you can see
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

cat httpd-vhosts.conf
you can see :
<VirtualHost *:80>
    DocumentRoot "/home/www/mall/forum"
    ServerName bbs.xxx.com
<Directory "/home/www/mall/forum" >
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>
 
<VirtualHost *:80>
    DocumentRoot "/home/www/mall"
    ServerName www.xxx.com
    ServerAlias xxx.com
<Directory "/home/www/mall" >
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

you can add as below:

<VirtualHost *:80>
    DocumentRoot "/home/www/mall"
    ServerName news.xxx.com  
     DirectoryIndex news1.html news1.php
<Directory "/home/www/mall" >
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

你可能感兴趣的:(apache,linux,System,domain)