Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

can we get separate document root ?

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


joydeep at infoservices

Nov 15, 2009, 7:04 PM

Post #1 of 4 (321 views)
Permalink
can we get separate document root ?

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.



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


---------------------------------------------------------------------
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 [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


covener at gmail

Nov 15, 2009, 7:08 PM

Post #2 of 4 (296 views)
Permalink
Re: can we get separate document root ? [In reply to]

On Sun, Nov 15, 2009 at 10:04 PM, J. Bakshi <joydeep [at] infoservices> 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"?

--
Eric Covener
covener [at] gmail

---------------------------------------------------------------------
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 [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


joydeep at infoservices

Nov 15, 2009, 7:26 PM

Post #3 of 4 (296 views)
Permalink
Re: can we get separate document root ? [In reply to]

Eric Covener wrote:
> On Sun, Nov 15, 2009 at 10:04 PM, J. Bakshi <joydeep [at] infoservices> 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.


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


---------------------------------------------------------------------
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 [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


joydeep at infoservices

Nov 15, 2009, 7:40 PM

Post #4 of 4 (299 views)
Permalink
Re: [ SOLVED ] can we get separate document root ? [In reply to]

J. Bakshi wrote:
> Eric Covener wrote:
>
>> On Sun, Nov 15, 2009 at 10:04 PM, J. Bakshi <joydeep [at] infoservices> 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 [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.