.htaccess文件无法在一个虚拟主机中运行

时间:2015-03-04 07:57:17

标签: php apache .htaccess mod-rewrite virtualhost

我有两个虚拟主机,

域名

<VirtualHost 11.227.6.4:443>

#DocumentRoot /var/www

        <Directory /var/www/masons/web>
                Options Indexes FollowSymLinks
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
</VirtualHost>


<VirtualHost 11.227.6.4:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/masons/web
        <Directory />
                Options Indexes FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /var/www/masons/web>
                Options Indexes FollowSymLinks
                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>

域2

<VirtualHost 11.227.6.4:443>


        <Directory /var/www/ilakkya/web>
                Options Indexes FollowSymLinks
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

</VirtualHost>


<VirtualHost 11.227.6.4:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/ilakkaya/web/
        <Directory />
                Options Indexes FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory "/var/www/ilakkya/web/">
                Options Indexes FollowSymLinks
                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
</directory>

在域中,文件夹中的一个.htaccess文件正在运行,但在域2 .htaccess文件中无效。

这是一个php symfony项目,app.php文件正在通过.htaccess文件加载。

由于

0 个答案:

没有答案