Custom script for protecting directories

rembo

New member
Joined
Dec 1, 2012
Messages
8
Hi, I'm using DA with nginx and w/o apache (php-fpm). So we need to manually generate nginx config on submission (to avoid using htaccess). We've found the solution in using all_pre.sh custom script, but is there any other way to realize such thing? Separate script for this action will be very useful.
 
Since nginx is not a supported web server you are on your own for help.
 
Hello,

What do you mean? Do you want to simulate
Code:
Order Allow,Deny
of Apache with the help of nginx? Or what?
 
Hello,

What do you mean? Do you want to simulate
Code:
Order Allow,Deny
of Apache with the help of nginx? Or what?

I mean password protection of web folders. DA creates .htaccess in selected folder, but I need to write special data to nginx config, before or after .htaccess creation.
 
Doing it manually will probably be a hurdle for most users.

It appears @rembo already knows what @chatwizrd writes, but is looking for a way to make it user-friendly.

I believe that the solution in the thread-starter post is probably the best way to do it; perhaps somone will write a plugin to make it easy enough for end-users to do without hosting company intervention.

Jeff
 
I mean password protection of web folders. DA creates .htaccess in selected folder, but I need to write special data to nginx config, before or after .htaccess creation.

While directadmin does not support NGINX, you should write a script or a plugin to achieve the desired. I could help you with the subject, if you want. But my time will cost you some money.
 
I already have some plans for nginx, but firstly CB 2.0 needs to be released as stable (RC1 of it should be released very soon).
 
Doing it manually will probably be a hurdle for most users.

It appears @rembo already knows what @chatwizrd writes, but is looking for a way to make it user-friendly.

I believe that the solution in the thread-starter post is probably the best way to do it; perhaps somone will write a plugin to make it easy enough for end-users to do without hosting company intervention.

Jeff

Yes, you're right. It's really lack of custom scripts for hooking actions that modify apache configs.

First we want to use all_pre.sh/all_post.sh for this action, but:
all_post.sh doesn't hooks this action, all_pre.sh runs before the action is done so we don't have the new protected directory path in protected.list and .htpasswd generated.

As a variant, to do this action as a cron job, but this isn't convinient.
 
all_post.sh doesn't hooks this action, all_pre.sh runs before the action is done so we don't have the new protected directory path in protected.list and .htpasswd generated.

If so, then you might need to report it to John as a bug or a feature request.
 
Hello,

pre/post scripts are quite easy to add.

To confirm, you're looking for pre/post scripts for additions to an .htaccess after adding/removing password protection on a directory?
Once confirmed, I can add them in.

John
 
Hello,

pre/post scripts are quite easy to add.

To confirm, you're looking for pre/post scripts for additions to an .htaccess after adding/removing password protection on a directory?
Once confirmed, I can add them in.

John

Hello. Not only .htaccess, it will be good for all actions that modify apache configs and .htaccess files.

Thanks.
 
Hello. Not only .htaccess, it will be good for all actions that modify apache configs and .htaccess files.

Thanks.

But in the current situation, yes, really needed custom scripts after adding/editing/removing password protection on a directory and all ssl-related actions. I will use custom scripts for generating parts of nginx config that would be included in main user config.
 
Back
Top