将“AllowOverride None”更改为“AllowOverwrite All”



这两个文件内部有相同的代码。

/etc/apache2/站点启用/1000默认

/etc/apache2/站点可用/默认

我想将AllowOverride None更改为AllowOverwrite All。我应该更改哪个文件

是否所有AllowOverride None更改为AllowOverride all

<VirtualHost *:80>
    DocumentRoot /var/www/drupal
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/drupal>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        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>

/etc/apache2/启用站点/1000默认

/etc/apache2/可用站点/默认

实际上,这些不是2文件。一个是另一个的符号链接。这就是为什么它们完全一样。

站点-可用仅显示您的系统中有哪些站点。但是启用的站点显示哪些站点正在使用。

所以只需更改sites-available中的原始文件,因为它们是同一个文件。是的,使用AllowOverride All<Directory /var/www/drupal>块下启用.htaccess使用。

如果以后添加更多站点,则可以使用命令a2ensitea2dissite启用和禁用站点。如果你需要这样做,下面的链接会给出确切的说明,因为你的网站是实时的,所以你不应该这样做。

http://manpages.ubuntu.com/manpages/trusty/man8/a2ensite.8.html

最新更新