Skip to content

Commit

Permalink
[*] Fix logs in user directory
Browse files Browse the repository at this point in the history
  • Loading branch information
vixh committed Aug 30, 2010
1 parent 3be5ced commit 8024ccb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions virtual_feature.pl
Expand Up @@ -4,6 +4,7 @@
our ($conf_dir, $sites_avaliable_dir, $sites_enabled_dir, $log_dir);

#TODO if $conf_dir, $sites_avaliable_dir, $sites_enabled_dir come from user put trail slash
#TODO Config set by user not working, only default values

if($config{'conf_dir'} eq "")
{
Expand All @@ -20,11 +21,7 @@
$sites_enabled_dir = 'sites-enabled/';
}

if($config{'log_dir'} eq "")
{
my ($d) = @_;
$log_dir = "$d->{'home'}/logs/";
}


sub feature_always_links
{
Expand Down Expand Up @@ -181,6 +178,11 @@ sub feature_setup

my $file;

if($config{'log_dir'} eq "")
{
$log_dir = "$d->{'home'}/logs/";
}

open($file, ">" . $conf_dir . $sites_available_dir . $d->{'dom'} . ".conf");
#TODO in config.info add nginx config template with default value conf_tmpl=nginx config template,9,server{ listen $d->{'ip'}:80;} or get it from nginx_conf.tpl and parse
#TODO Determine subdomain and dont put rewrite ^/(.*) http://www.$d->{'dom'} permanent;
Expand Down

0 comments on commit 8024ccb

Please sign in to comment.