diff options
author | Florent Villard <warly@mandriva.com> | 2003-02-28 12:02:14 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2003-02-28 12:02:14 +0000 |
commit | e50ac7719ada4befb44f5e5ae57f5c3cd4ff2e68 (patch) | |
tree | 542ea2e5e5f74b5be4941ae7e93b702c86a7064d /web_wizard/scripts/Webconf.pm | |
parent | 74b7c7d175e148500cf987f8d18ea8f7c981d848 (diff) | |
download | drakwizard-e50ac7719ada4befb44f5e5ae57f5c3cd4ff2e68.tar drakwizard-e50ac7719ada4befb44f5e5ae57f5c3cd4ff2e68.tar.gz drakwizard-e50ac7719ada4befb44f5e5ae57f5c3cd4ff2e68.tar.bz2 drakwizard-e50ac7719ada4befb44f5e5ae57f5c3cd4ff2e68.tar.xz drakwizard-e50ac7719ada4befb44f5e5ae57f5c3cd4ff2e68.zip |
try to add apache2 module and fix apache one
Diffstat (limited to 'web_wizard/scripts/Webconf.pm')
-rw-r--r-- | web_wizard/scripts/Webconf.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/web_wizard/scripts/Webconf.pm b/web_wizard/scripts/Webconf.pm index 4da50a82..a787ac37 100644 --- a/web_wizard/scripts/Webconf.pm +++ b/web_wizard/scripts/Webconf.pm @@ -15,7 +15,7 @@ sub check { 0; } -my $file = "/etc/httpd/conf/commonhttpd.conf"; +my $file = "/etc/httpd/conf/httpd.conf"; my $root; if (-f $file) { @@ -40,8 +40,18 @@ sub check_dir { } sub chg_docroot { + my $old; substInFile { - s|(^\s*\#?\s*DocumentRoot\s*).*|$1$ENV{wiz_dir}|; + s|(^\s*\#?\s*DocumentRoot\s*)(\S*).*|$1$ENV{wiz_dir}| and $old ||=$2; + } "/etc/httpd/conf/httpd.conf"; + + print "DEBUG $old"; + substInFile { + s|^\s*<Directory\s*$old/?>|<Directory $ENV{wiz_dir}>|; + } "/etc/httpd/conf/commonhttpd.conf" if $old; + + substInFile { + s|^\s*<Directory\s*/var/www/html/?>|<Directory $ENV{wiz_dir}>|; } "/etc/httpd/conf/commonhttpd.conf"; } |