如何在apache,ubuntu上配置两个域/虚拟主机,同时保留默认文件选项

时间:2013-07-22 18:59:20

标签: apache ubuntu virtualhost

我正在尝试在ubuntu OS的单个apache服务器上配置2个域。我保留原始选项,同时从已启用网站的副本中创建此默认文件,但它不起作用。 所以有很多默认值,它不能像这样工作,如果我想保留这些默认值,不确定缺少什么。我是初学者请帮我详细说明

<VirtualHost *:80>
    ServerAdmin mail@example.com
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/example.com
    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>
    <Directory /var/www/example.com>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All 
        Order allow,deny
        allow from all
    </Directory>

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

    ErrorLog ${APACHE_LOG_DIR}/error.log

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

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

0 个答案:

没有答案