You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "J. Bakshi" <jo...@infoservices.in> on 2009/11/16 04:40:03 UTC

Re: [users@httpd] [ SOLVED ] can we get separate document root ?

J. Bakshi wrote:
> Eric Covener wrote:
>   
>> On Sun, Nov 15, 2009 at 10:04 PM, J. Bakshi <jo...@infoservices.in> wrote:
>>   
>>     
>>> Hello list,
>>>
>>> I am suffering with document root issue with my apache config . I have
>>> placed a config like
>>>
>>> ```````````````
>>>
>>> Alias /personal/joydeep  /var/personal_work_area/joydeep
>>>
>>>
>>>        <Directory /var/personal_work_area/joydeep/>
>>>              DirectoryIndex index.php
>>>
>>>        </Directory>
>>>
>>> ``````````
>>>
>>> But realurl is not working here as rewrite rule always use /var/www as its document root. Is it possible to force the document root inside <Directory> ?
>>> Please let me know.
>>>     
>>>       
>> If your rewrite rules are in htaccess, are you specifying RewriteBase?
>>
>> What is "not working"?
>>
>>   
>>     
>
> Thanks for your response.  Here is the setup. I have placed a folder
> called test at 
>
> /var/personal_work_area/joydeep
>
> The test folder has alice.html and bob.html and the .htaccess is
>
> ````
> Options +FollowSymLinks
> RewriteEngine On
> RewriteBase  /
>
> RewriteRule ^alice.html$ bob.html
> ````
>
> When i visit alice.html apache fires an error at log as
>
> ````
>  [error] [client 192.168.1.100] script '/var/www/index.php' not found or unable to stat
> `````````````
>
> It should look at /var/personal_work_area/joydeep but here it is looking at /var/www which is defined at the main httpd.conf as document root.
>
>
>   

Eric, I have solved it :-) Thanks for showing me the right track
I have placed the follwing in .htaccess

````
RewriteBase  /personal/joydeep/test
````

and now the rewriterule is working fine. By the way ; I am also trying
to make it working inside apache configuration.

Thanks once again


-- 
জয়দীপ বক্সী


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org