Skip to content

Commit 3b019a4

Browse files
committed
added cgi support
1 parent c5a7bdc commit 3b019a4

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

bin/v_rebuild_web_domains

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,21 @@ for domain in $domains; do
8484
$V_WEBTPL/apache_$template.sh $user $domain $ip $V_HOME $docroot
8585
fi
8686

87+
# Checking cgi
88+
cgi=$(get_web_domain_value '$CGI')
89+
if [ "$cgi" != 'yes' ]; then
90+
# Defining params for ScriptAlias
91+
search_phrase='ScriptAlias '
92+
str_repl=" #ScriptAlias /cgi-bin/"
93+
str_repl="$str_repl $V_HOME/$user/domains/$domain/cgi-bin/"
94+
change_web_config
95+
96+
# Defining params for Options
97+
search_phrase='Options '
98+
str_repl=' Options +Includes -Indexes -ExecCGI'
99+
change_web_config
100+
fi
101+
87102
# Checking ssl
88103
cert=$(get_web_domain_value '$SSL_CERT')
89104
if [ ! -z "$cert" ]; then
@@ -107,6 +122,20 @@ for domain in $domains; do
107122
if [ -x $V_WEBTPL/apache_$template.sh ]; then
108123
$V_WEBTPL/apache_$template.sh $user $domain $ip $V_HOME $docroot
109124
fi
125+
126+
# Checking cgi
127+
if [ "$cgi" != 'yes' ]; then
128+
# Defining params for ScriptAlias
129+
search_phrase='ScriptAlias '
130+
str_repl=" #ScriptAlias /cgi-bin/"
131+
str_repl="$str_repl $V_HOME/$user/domains/$domain/cgi-bin/"
132+
change_web_config
133+
134+
# Defining params for Options
135+
search_phrase='Options '
136+
str_repl=' Options +Includes -Indexes -ExecCGI'
137+
change_web_config
138+
fi
110139
fi
111140

112141
# Checking nginx

0 commit comments

Comments
 (0)