Apache配置虚拟主机

<VirtualHost  42.96.184.84:80>

        ServerAdmin leiwen@fansunion.cn

        DocumentRoot /var/www/FansUnion
        ServerName www.fansunion.cn
        ServerAlias fansunion.cn

        <Directory /var/www/FansUnion>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride all
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/FansUnion/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/FansUnion/access.log combined
</VirtualHost>

原文地址:https://www.cnblogs.com/qitian1/p/6463676.html