httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Mearns <mearn...@gmail.com>
Subject Re: [users@httpd] apache configuration: always go to parent directory
Date Wed, 11 Nov 2009 03:51:55 GMT
On Tue, Nov 10, 2009 at 10:00 PM, J. Bakshi <joydeep@infoservices.in> wrote:
> Brian Mearns wrote:
>> On Tue, Nov 10, 2009 at 4:43 AM, J. Bakshi <joydeep@infoservices.in> wrote:
>>
>>> Hello,
>>>
>>> I have configured a personal work-space for mine in apache where I can
>>> experiment with different sites and here is the configuration
>>>
>>> ````````````````````````````````````````````
>>> Alias /personal/joydeep  /var/personal_work_area/joydeep
>>>
>>> DocumentRoot  /var/personal_work_area/joydeep/
>>>
>>>        <Directory /var/personal_work_area/joydeep/>
>>>
>>>          DirectoryIndex index.php
>>>
>>>           Options Indexes FollowSymLinks MultiViews
>>>                AllowOverride All
>>>                Order allow,deny
>>>                allow from all
>>>
>>>        </Directory>
>>> ``````````````````````````````````````````````````````````
>>>
>>> I have placed a folder ( a site) there. So the absolute path of that
>>> folder is  /var/personal_work_area/joydeep/experiment. Whenever I access
>>> the folder through browser by visiting
>>> http://192.168.1.1/personal/joydeep/experimet   I  get "page not found
>>> error".  the log reports
>>>
>>> ``````````````````````````
>>> URL   /personal/joydeep/experiment/index.php,  referer:
>>> http://192.168.1.1/personal/joydeep/
>>> ```````````````````````````````
>>> It is definitely wrong as it refer the parent folder and not the
>>> subfolder "experiment" hence the index.php is missing.  Is there any
>>> problem with my configuration ?
>>>
>>>
>> [clip]
>>
>> I don't really understand the problem. The error log shows that the
>> index page for the child ("experiment") directory is being requested.
>> I'm not sure why the referer is showing up the way it is, but that
>> shouldn't be relevant. The URL of interest in the log is
>> /personal/joydeep/experiment/index.php, so it would appear that this
>> file, /var/personal_work_area/joydeep/experiment/index.php, doesn't
>> exist.
>>
>>
>
> the file exist here.
>
> ````````````````````````
> debian:~# ls -l /var/personal_work_area/joydeep/experiment/index.php
>
> lrwxrwxrwx 1 wwwrun www 19 2009-10-28 22:22
> /var/personal_work_area/joydeep/experiment/index.php
>
> `````````````````````````````````````````
>
>
>> On a probably unrelated note, is there a reason you have an alias set
>> up for your document root? "
>
> As I have configured it is actually a personal workspace for
> experimental work. Actually it is protected by the " Require user"
> directive that only user can login there.
>
>
>> Aliases are usually used to make
>> directories that are not under the DocumentRoot available through the
>> web server, or sometimes to give alternate URLs to content that is
>> under the DocumentRoot (though RewriteRules are more common for that,
>> I think).
>>
>> -Brian
>>
>>
[clip]

Ok, so the file exists, but is still giving a 404? Your original post
mentions that it always goes to the parent directory, but that's not
what's happening. Why it's not giving you the file that is there I
can't say for sure, but I don't think it has anything to do with
parent directories.

This Alias thing is troubling me, and may be causing your problem. You
have an alias that points to the same directory as your document root:
I don't see why specifically this would cause problems, but it doesn't
sit well with me. Try removing it, see if that happens to do anything.

On the other hand, I noticed a typo in your original post; I assumed
it was just a typo in your email, but maybe you're actually trying to
visit the wrong address? http://192.168.1.1/personal/joydeep/experimet
should have an 'n' in "experimet".

-Brian
-- 
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net

---------------------------------------------------------------------
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


Mime
View raw message