I have added these lines in my 000-default virtual host file:
Alias /antoniocs/project "/home/antoniocs/www/project"
<Directory "/home/antoniocs/www/project">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
/home/antoniocs/www/project Contains a drupal website
If I go to:
localhost/antoniocs/project
This works out fine. I see everything perfectly. But when I try to click on a link that takes me, for example, to:
localhost/antoniocs/project/category
I get this error:
Not Found
The requested URL /home/antoniocs/www/project/index.php was not found on this server.
Is this not processing the .htaccess that is in the project folder? What am I doing wrong???
NOTE: I also find it strange that it's giving me a file path and not an url path
Running on Apache 2.2.16 (with mod rewrite) Ubuntu 10.10 php 5.3.3-1ubuntu9.1
EXTRA NOTE: For those that don't know drupals htaccess, it redirects everything to index.php?q=$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
I know this is a very old post but I thought this information I found on another StackExchange site might be of assistance.
When using an
alias
in your apache configuration you also need to useRewriteBase
in your .htaccess file that's the same as the alias.Requires that you include...
I actually noticed it on a project because there was a rewrite going on with images/js/css and all my supplemental files were not loading.
It sounds like a rewrite is taking place in the wrong location. For example, the webserver is trying to find the URL
/home/antoniocs/www/project/index.php
instead of the local file by the same path. Perhaps check the Drupal installation itself? You can check what the server thinks by looking at the requests for redirection using something like curl:See if code 301 or 302 is returned, and that may help narrow down the problem. E.g.:
Alternatively you can also enable
userdir
module of apache. So that you don't have to create an alias to access the codes that resides in your home directoryPut your code under this public_html and you can access it by http://localhost/~username or http://ipaddress/~username (for example: http://localhost/~aneesh)
You can change the directory name(public_html) by editing the conf file
/etc/apache2/mods-enabled/userdir.conf
See if anything here can help: https://drupal.org/node/163915, your problem may have something to do with the AllowOverride statement in; /etc/apache2/sites-available/default