|
1 | 1 | #!/bin/bash |
2 | | -# info: adding cgi for domain |
| 2 | +# info: adding cgi support for domain |
3 | 3 |
|
4 | 4 | #----------------------------------------------------------# |
5 | 5 | # Variable&Function # |
@@ -53,55 +53,32 @@ is_web_domain_key_empty '$CGI' |
53 | 53 | tpl_name=$(get_web_domain_value '$TPL') |
54 | 54 | tpl_file="$V_WEBTPL/apache_$tpl_name.tpl" |
55 | 55 |
|
56 | | -# Defining config |
| 56 | +# Defining params for ScriptAlias |
57 | 57 | conf="$V_HOME/$user/conf/httpd.conf" |
58 | | - |
59 | | -# Defining search phrase |
60 | 58 | search_phrase='ScriptAlias ' |
61 | | - |
62 | | -# Defining replace string |
63 | 59 | str_repl=" ScriptAlias /cgi-bin/ $V_HOME/$user/domains/$domain/cgi-bin/" |
| 60 | +change_web_config |
64 | 61 |
|
65 | | -# Adding cgi-bin support |
66 | | -httpd_change_config |
67 | | - |
68 | | -# Defining search phrase |
| 62 | +# Defining params for Options |
69 | 63 | search_phrase='Options ' |
70 | | - |
71 | | -# Defining replace string |
72 | 64 | str_repl=' Options +Includes -Indexes +ExecCGI' |
73 | | - |
74 | | -# Adding execscgi support |
75 | | -httpd_change_config |
| 65 | +change_web_config |
76 | 66 |
|
77 | 67 | # Checking ssl |
78 | 68 | cert=$(get_web_domain_value '$SSL_CERT') |
79 | 69 | if [ ! -z "$cert" ]; then |
80 | 70 |
|
81 | | - # Get ssl template name |
| 71 | + # Defining params for ScriptAlias |
82 | 72 | tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" |
83 | | - |
84 | | - # Defining ssl config |
85 | 73 | conf="$V_HOME/$user/conf/shttpd.conf" |
86 | | - |
87 | | - # Defining search phrase |
88 | 74 | search_phrase='ScriptAlias ' |
89 | | - |
90 | | - # Defining replace string |
91 | 75 | str_repl=" ScriptAlias /cgi-bin/ $V_HOME/$user/domains/$domain/cgi-bin/" |
| 76 | + change_web_config |
92 | 77 |
|
93 | | - # Adding cgi-bin support |
94 | | - httpd_change_config |
95 | | - |
96 | | - # Defining search phrase |
| 78 | + # Defining params for Options |
97 | 79 | search_phrase='Options ' |
98 | | - |
99 | | - # Defining replace string |
100 | 80 | str_repl=' Options +Includes -Indexes +ExecCGI' |
101 | | - |
102 | | - # Adding execscgi support |
103 | | - httpd_change_config |
104 | | - |
| 81 | + change_web_config |
105 | 82 | fi |
106 | 83 |
|
107 | 84 |
|
|
0 commit comments