简体   繁体   中英

.htaccess not loading for virtual hosts

This is a Ubuntu 12.04 desktop setup.
I have in my virtual host the following :
anjanesh@desktop:/etc/apache2/sites-available$ cat domain

<VirtualHost *:80>
    ServerName local.domain.com
    DocumentRoot /home/anjanesh/vhosts/domain/
    <Directory /home/anjanesh/vhosts/domain>
        Options Indexes FollowSymLinks MultiViews +ExecCGI
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

AllowOverride is set to All.
But nothing in my .htaccess (local.domain.com) works. I don't know why.

  1. .htaccess in localhost works. (http://locahost/anjanesh)
  2. /home/anjanesh/vhosts is actually a symlink to /home/anjanesh/Dropbox/vhosts. I even gave the proper path (Dropbox) in the virtual host file, still no effect.

Is there something else I got to enable ?

Maybe you should use followSymLink before the link in the folder hierarchy?

<Directory /home/anjanesh>
    Options +FollowSymLinks
</Directory>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM