在Apache2中设置子域

时间:2015-02-20 14:01:45

标签: apache

我有一个文件夹/var/www/forum,我有论坛文件。我目前通过访问xyz.com/forum来访问它。如何设置apache以允许我访问forum.xyz.com访问论坛?

1 个答案:

答案 0 :(得分:1)

希望有所帮助

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot "/Users/user_name/Sites/site/forum"
    ServerName forum.site.ru
    <Directory "/Users/user_name/Sites/site/forum">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    ErrorLog "/private/var/log/apache2/site_error_log"
    CustomLog "/private/var/log/apache2/site_access_log" common
</VirtualHost>

由于