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

Mailing List Archive: Cherokee: users

Disabling Directory indexing is on in cherokee

 

 

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


shanevolpe at gmail

Apr 1, 2008, 3:25 AM

Post #1 of 15 (650 views)
Permalink
Disabling Directory indexing is on in cherokee

How do you disable directory indexing on Cherokee for a given site?
Regards,
Shane
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


shanevolpe at gmail

Apr 1, 2008, 3:33 AM

Post #2 of 15 (628 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

I forgot to mention that I'm using Cherokee 0.6 and its an embedded
system so using cherokee-admin is not an option.

On Tue, Apr 1, 2008 at 6:25 AM, Shane Volpe <shanevolpe[at]gmail.com> wrote:
> How do you disable directory indexing on Cherokee for a given site?
> Regards,
> Shane
>



--
Registered Linux User: #293401
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


taher at unixwars

Apr 1, 2008, 4:39 AM

Post #3 of 15 (631 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Hi Shane.
The idea behind cherokee-admin is that it should always be an option to avoid the configuration hassle. For minimal environments cherokee-admin should be used on another machine and then copy the resulting configuration file to the embedded device.

You'll be using another computer to develop whatever application you are working on, so this shouldn't be a problem.

On 01 Apr 2008, Shane Volpe wrote:
> I forgot to mention that I'm using Cherokee 0.6 and its an embedded
> system so using cherokee-admin is not an option.
>
> On Tue, Apr 1, 2008 at 6:25 AM, Shane Volpe <shanevolpe[at]gmail.com> wrote:
> > How do you disable directory indexing on Cherokee for a given site?
> > Regards,
> > Shane



--
taher[at]unixwars.com
http://unixwars.com
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


Nikolai.Kondrashov at oktetlabs

Apr 1, 2008, 4:54 AM

Post #4 of 15 (628 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Taher Shihadeh wrote:
> The idea behind cherokee-admin is that it should always be an option to
> avoid the configuration hassle. For minimal environments cherokee-admin
> should be used on another machine and then copy the resulting
> configuration file to the embedded device.
I agree, but there should also be an option to have as complex configuration
as needed.

> You'll be using another computer to develop whatever application you are
> working on, so this shouldn't be a problem.
OK, what about automatically-generated configuration? Our project, for
instance, allows specifying Web-server listening port through our management
interface (which allows configuring a huge amount of other things, also),
which is currently done by processing environment variables in
read_config_embedded.c.

We will need the ability to configure other Web-server parameters, very
probably, which could easily be accomplished through a configuration file
generation both at run time and at build time. And without proper
configuration file documentation I will need to dig into source code.

Of course providing a possibility for hard-coded configuration would satisfy
our needs, but, having possibility to generate the configuration file is
much nicer.

Sincerely,
Nick
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


taher at unixwars

Apr 1, 2008, 5:43 AM

Post #5 of 15 (631 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

On 01 Apr 2008, Nikolai Kondrashov escribiówrote:
> > avoid the configuration hassle. For minimal environments cherokee-admin
> > should be used on another machine and then copy the resulting
> > configuration file to the embedded device.
> I agree, but there should also be an option to have as complex configuration
> as needed.

Agreed. When I said 'minimal environments' y meant 'embedded environments', not 'minimal configuration'.
cherokee-admin is new since release 0.6, so it figures any shortcomings will be solved/enhanced.
For example a few days back, thanks to a question sent to this list, Alvaro noticed that the number of threads wasn't managed through cherokee-admin. He sumbitted changes to cherokee-admin the same day. I don't remember right now if it's allready in 0.6.1, but I'm quite sure I've seen the modification in SVN.

We do monitor whatever is said here. Don't hesitate to ask for improvements.

> We will need the ability to configure other Web-server parameters, very
> probably, which could easily be accomplished through a configuration file
> generation both at run time and at build time. And without proper
> configuration file documentation I will need to dig into source code.

Well... there is always the info provided at http://www.cherokee-project.com/doc/internal_configuration.html
Documentation, however, could and should always be improved. Work in progress there ;)

> Of course providing a possibility for hard-coded configuration would satisfy
> our needs, but, having possibility to generate the configuration file is
> much nicer.

I don't think I quite understood you here, sorry.
If by generating the config file you mean having nicer documentation on the internal format, what is this hard-coded configuration you talk about: using cherokee-admin as is, improving some missing features...?

Regards,
Taher
--
taher[at]unixwars.com
http://unixwars.com
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


Nikolai.Kondrashov at oktetlabs

Apr 1, 2008, 6:44 AM

Post #6 of 15 (631 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Taher Shihadeh wrote:
> Agreed. When I said 'minimal environments' y meant 'embedded environments', not 'minimal configuration'.
Yes, but using cherokee-admin somewhat implies 'minimal configuration' when
compared to the set of every possible configuration.

> We do monitor whatever is said here. Don't hesitate to ask for improvements.
Thanks, I will :)! And I hope these improvements, if implemented, will be
useful for someone else :)

> Well... there is always the info provided at
> http://www.cherokee-project.com/doc/internal_configuration.html
Thanks, haven't seen that page yet :)

> what is this hard-coded configuration you talk about: using cherokee-admin
> as is, improving some missing features...?
I meant the way u-Cherokee is configured, i.e. by modifying
read_config_embedded.c

Sincerely,
Nick
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


gwolf at gwolf

Apr 1, 2008, 8:54 AM

Post #7 of 15 (631 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Taher Shihadeh dijo [Tue, Apr 01, 2008 at 01:39:16PM +0200]:
> Hi Shane.
>
> The idea behind cherokee-admin is that it should always be an option
> to avoid the configuration hassle. For minimal environments
> cherokee-admin should be used on another machine and then copy the
> resulting configuration file to the embedded device.
>
> You'll be using another computer to develop whatever application you
> are working on, so this shouldn't be a problem.

Frankly speaking, this seems like a very flawed argument.

Cherokee-admin is a nice tool. But denying the user the ability to
modify the configuration file on his own, using the same tools he has
always used for any other Unixy daemon... Is a big demotivator. The
need to use cherokee-admin makes the whole program (even if it is
not - even without even looking at it!) seem fragile and
Windows-like.

Using a helper administrative script should be an option, but not the
only way.

--
Gunnar Wolf - gwolf[at]gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


shanevolpe at gmail

Apr 1, 2008, 10:29 AM

Post #8 of 15 (631 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

It has been a very good conversation but back to my original question:
I want to disable the automatic directory (file) indexing (listing ?)
so the contents of a directory on my system will not get served up on
a web page. What would be the 0.6 Cherokee syntax to do this in the
config file?
Regards,
Shane

On Tue, Apr 1, 2008 at 11:54 AM, Gunnar Wolf <gwolf[at]gwolf.org> wrote:
> Taher Shihadeh dijo [Tue, Apr 01, 2008 at 01:39:16PM +0200]:
>
> > Hi Shane.
> >
> > The idea behind cherokee-admin is that it should always be an option
> > to avoid the configuration hassle. For minimal environments
> > cherokee-admin should be used on another machine and then copy the
> > resulting configuration file to the embedded device.
> >
> > You'll be using another computer to develop whatever application you
> > are working on, so this shouldn't be a problem.
>
> Frankly speaking, this seems like a very flawed argument.
>
> Cherokee-admin is a nice tool. But denying the user the ability to
> modify the configuration file on his own, using the same tools he has
> always used for any other Unixy daemon... Is a big demotivator. The
> need to use cherokee-admin makes the whole program (even if it is
> not - even without even looking at it!) seem fragile and
> Windows-like.
>
> Using a helper administrative script should be an option, but not the
> only way.
>
> --
> Gunnar Wolf - gwolf[at]gwolf.org - (+52-55)5623-0154 / 1451-2244
> PGP key 1024D/8BB527AF 2001-10-23
> Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
>
>
> _______________________________________________
> Cherokee mailing list
> Cherokee[at]cherokee-project.com
> http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee
>



--
Registered Linux User: #293401
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


Nikolai.Kondrashov at oktetlabs

Apr 1, 2008, 10:40 AM

Post #9 of 15 (634 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Shane Volpe wrote:
> It has been a very good conversation but back to my original question: I
> want to disable the automatic directory (file) indexing (listing ?) so the
> contents of a directory on my system will not get served up on a web page.
> What would be the 0.6 Cherokee syntax to do this in the config file?
You just shouldn't use "dirlist" or "common" handler for directories, but use
"file" instead.

So if you see "...!handler = common", replace it with "...!hanlder = file".
Or if you don't have such entry, try adding something like this:
"vserver!default!directory!/!handler = file" - this will assign the default
handler. I'm not sure if it will work correctly, because I've just
discovered it a couple of hours ago and couldn't verify it, because the
machine with test setup is unreachable.

If it doesn't work, post your configuration here.

Sincerely,
Nick
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


taher at unixwars

Apr 1, 2008, 11:20 AM

Post #10 of 15 (632 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Hi Shane!

On Tuesday 01 April 2008 19:29:07, Shane Volpe wrote:
> It has been a very good conversation but back to my original question:
> I want to disable the automatic directory (file) indexing (listing ?)
> so the contents of a directory on my system will not get served up on
> a web page. What would be the 0.6 Cherokee syntax to do this in the
> config file?

I've reviewed what I sent you in the last message and I can't believe I actually forgot to answer the original question X-)

I think you need the handler named 'file'.
For example this prevents the directory indexing of the '/images' directory on my default Virtual Server.

vserver!default!directory!/images!priority = 100099
vserver!default!directory!/images!only_secure = 0
vserver!default!directory!/images!handler = file
vserver!default!directory!/images!handler!iocache = 1

That is what cherokee-admin spits directly. I've just made the test and the Handler I selected for this (in Virtual Servers-> default ->Behaviour tab) is called 'Static content'

Regards,
Taher
--
taher[at]unixwars.com
http://unixwars.com
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


taher at unixwars

Apr 1, 2008, 11:23 AM

Post #11 of 15 (632 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Hi Gunnar!

On Tuesday 01 April 2008 17:54:52, Gunnar Wolf wrote:
>> The idea behind cherokee-admin is that it should always be an option
>> to avoid the configuration hassle.
[...]
> Cherokee-admin is a nice tool. But denying the user the ability to
> modify the configuration file on his own, using the same tools he has
> always used for any other Unixy daemon... Is a big demotivator.

Who is denying anything?
The config file is a plain text file, and the internal format is documented (though this documentation could and will be improved).
As noted by Shane, *having to use* cherokee-admin can be a hassle, but its usage is not an imposition. Just a help, although the initial setup will surely be a lot simpler via cherokee-admin.

> Using a helper administrative script should be an option, but not the
> only way.

We totally agree on this :)
One of the nice things of Unix (at least for me) is being able to change the settings by just editing text files. It's a commodity that eases up a lot the process of reading info and making scripts. Knowing Alvaro I just can't imagine him having the idea of transitioning to a binary config-file.

--
taher[at]unixwars.com
http://unixwars.com


shanevolpe at gmail

Apr 2, 2008, 3:45 AM

Post #12 of 15 (629 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Nick,
It sort of worked, it stopped the the automatic directory listing but
now it does not bring up index.php by default if I just enter in the
ip address. I need to actually specify index.php in the link:
Example:
"https://192.168.0.100" gives me a 403 Forbidden code
"https://192.168.0.100/index.php" works just fine


###########Site Config File#######################################
vserver!default!document_root = /var/www
vserver!default!directory_index = index.php,index.html

vserver!default!logger = combined
vserver!default!logger!access!type = file
vserver!default!logger!access!filename = /var/log/cherokee.access
vserver!default!logger!access!buffsize = 16384
vserver!default!logger!error!type = file
vserver!default!logger!error!filename = /var/log/cherokee.error

vserver!default!directory!/!handler = file
vserver!default!directory!/!handler!iocache = 0
vserver!default!directory!/!priority = 1
vserver!default!directory!/!only_secure = 1

vserver!default!extensions!php!handler = phpcgi
vserver!default!extensions!php!handler!balancer = round_robin
vserver!default!extensions!php!handler!balancer!type = interpreter
vserver!default!extensions!php!handler!balancer!local1!host = localhost:1234
vserver!default!extensions!php!handler!balancer!local1!env!PHP_FCGI_CHILDREN = 5
vserver!default!extensions!php!handler!balancer!local1!interpreter =
/usr/bin/php -b 1234
vserver!default!extensions!php!priority = 99999
############################################################################

#########Main Cherokee Config FIle##############################################
# Server
#
server!port = 80
server!port_tls = 443
server!timeout = 60
server!keepalive = 1
server!keepalive_max_requests = 500
server!pid_file = /var/run/cherokee.pid
server!server_tokens = full
server!encoder!gzip!allow = html,html,txt,css,js
server!panic_action = /usr/bin/cherokee-panic
server!mime_files = /etc/cherokee/mime.types

#
# Include files
#
include = /etc/cherokee/mods-enabled
include = /etc/cherokee/sites-enabled
######################################################################################




On Tue, Apr 1, 2008 at 1:40 PM, Nikolai Kondrashov
<Nikolai.Kondrashov[at]oktetlabs.ru> wrote:
> Shane Volpe wrote:
> > It has been a very good conversation but back to my original question: I
> > want to disable the automatic directory (file) indexing (listing ?) so the
> > contents of a directory on my system will not get served up on a web page.
> > What would be the 0.6 Cherokee syntax to do this in the config file?
> You just shouldn't use "dirlist" or "common" handler for directories, but use
> "file" instead.
>
> So if you see "...!handler = common", replace it with "...!hanlder = file".
> Or if you don't have such entry, try adding something like this:
> "vserver!default!directory!/!handler = file" - this will assign the default
> handler. I'm not sure if it will work correctly, because I've just
> discovered it a couple of hours ago and couldn't verify it, because the
> machine with test setup is unreachable.
>
> If it doesn't work, post your configuration here.
>
> Sincerely,
> Nick
>



--
Registered Linux User: #293401
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


alvaro at sun

Apr 2, 2008, 5:15 AM

Post #13 of 15 (633 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

On 2 Apr 2008, at 12:45, Shane Volpe wrote:
> Nick,
> It sort of worked, it stopped the the automatic directory listing but
> now it does not bring up index.php by default if I just enter in the
> ip address. I need to actually specify index.php in the link:
> Example:
> "https://192.168.0.100" gives me a 403 Forbidden code
> "https://192.168.0.100/index.php" works just fine

You could add this rule:

vserver!default!request!^/$!handler = redir
vserver!default!request!^/$!rewrite!1!show = 0
vserver!default!request!^/$!rewrite!1!substring = /index.php
vserver!default!request!^/$!priority = 20

it should fix the problem.

--
Greetings, alo.

_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


shanevolpe at gmail

Apr 2, 2008, 5:20 AM

Post #14 of 15 (632 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Alvaro,
I tried the redir, but I keep getting the following error:
Starting Cherokee http server:
ERROR: Virtual Server parser: Unknown key "rewrite"
Couldn't read the config file: /etc/cherokee/cherokee.conf


On Wed, Apr 2, 2008 at 8:15 AM, Alvaro Lopez Ortega <alvaro[at]sun.com> wrote:
> On 2 Apr 2008, at 12:45, Shane Volpe wrote:
>
> > Nick,
> > It sort of worked, it stopped the the automatic directory listing but
> > now it does not bring up index.php by default if I just enter in the
> > ip address. I need to actually specify index.php in the link:
> > Example:
> > "https://192.168.0.100" gives me a 403 Forbidden code
> > "https://192.168.0.100/index.php" works just fine
> >
>
> You could add this rule:
>
> vserver!default!request!^/$!handler = redir
> vserver!default!request!^/$!rewrite!1!show = 0
> vserver!default!request!^/$!rewrite!1!substring = /index.php
> vserver!default!request!^/$!priority = 20
>
> it should fix the problem.
>
> --
> Greetings, alo.
>
>



--
Registered Linux User: #293401
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


alvaro at sun

Apr 2, 2008, 6:30 AM

Post #15 of 15 (630 views)
Permalink
Re: Disabling Directory indexing is on in cherokee [In reply to]

Hi Shane,

I'm sorry, I made a mistake when I wrote down the example. The correct
syntax is:

vserver!default!request!^/$!handler = redir
vserver!default!request!^/$!handler!rewrite!1!show = 0
vserver!default!request!^/$!handler!rewrite!1!substring = /index.php
vserver!default!request!^/$!priority = 20

Cheers!

On 2 Apr 2008, at 14:20, Shane Volpe wrote:
> Alvaro,
> I tried the redir, but I keep getting the following error:
> Starting Cherokee http server:
> ERROR: Virtual Server parser: Unknown key "rewrite"
> Couldn't read the config file: /etc/cherokee/cherokee.conf
>
>
> On Wed, Apr 2, 2008 at 8:15 AM, Alvaro Lopez Ortega <alvaro[at]sun.com>
> wrote:
>> On 2 Apr 2008, at 12:45, Shane Volpe wrote:
>>
>>> Nick,
>>> It sort of worked, it stopped the the automatic directory listing
>>> but
>>> now it does not bring up index.php by default if I just enter in the
>>> ip address. I need to actually specify index.php in the link:
>>> Example:
>>> "https://192.168.0.100" gives me a 403 Forbidden code
>>> "https://192.168.0.100/index.php" works just fine
>>>
>>
>> You could add this rule:
>>
>> vserver!default!request!^/$!handler = redir
>> vserver!default!request!^/$!rewrite!1!show = 0
>> vserver!default!request!^/$!rewrite!1!substring = /index.php
>> vserver!default!request!^/$!priority = 20
>>
>> it should fix the problem.
>>
>> --
>> Greetings, alo.
>>
>>
>
>
>
> --
> Registered Linux User: #293401
> _______________________________________________
> Cherokee mailing list
> Cherokee[at]cherokee-project.com
> http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee

--
Greetings, alo.

_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee

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


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.