debian-apache2配置多个站点

1、进入到sites-available文件夹下,cd /etc/apache2/sites-available。

2、复制default,cp default site1。

3、修改site1内容,红字文字地方修改


        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/site1


        /var/www/site1>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
       

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
       
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
       


        ErrorLog ${APACHE_LOG_DIR}/site1_error.log

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

        CustomLog ${APACHE_LOG_DIR}/site1_access.log combined

4、建立软连接,
ln -s /etc/apache2/sites-available/site1 /etc/apache2/sites-enabled/site1

你可能感兴趣的:(linux)