Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added support for custom public_html path in domains

  • Loading branch information...
commit 1acc14071aa9ea2f33353866f9df8813405770f6 1 parent 446a2cd
Murz authored
Showing with 16 additions and 7 deletions.
  1. +1 −0  CHANGELOG
  2. +1 −1  nginx-default.conf
  3. +14 −6 virtual_feature.pl
1  CHANGELOG
View
@@ -1,5 +1,6 @@
---- Version 0.3.1 from 2011-06-21 ----
- Fixed bug with module disable/enable always looks from default value
+ - Added support for custom public_html path in domains
---- Version 0.3 from 2011-05-18 ----
* Added feature to disable nginx for specific templates,
2  nginx-default.conf
View
@@ -8,7 +8,7 @@ server {
index index.php index.html index.htm;
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|txt|swfzip|tgz|gz|rar|bz2|doc|xls|pdf)$ {
- root ${HOME}/public_html;
+ root ${PUBLIC_HTML_PATH};
try_files $uri $uri/ @fallback;
}
20 virtual_feature.pl
View
@@ -366,12 +366,20 @@ sub feature_setup
$conf =~ s/\t/\n/g;
- $conf =~ s/\$\{DOM\}/$d->{'dom'}/g;
- $conf =~ s/\$\{IP\}/$conf_v_nginx_ip/g;
- $conf =~ s/\$\{PORT\}/$conf_v_nginx_port/g;
- $conf =~ s/\$\{PROXY_IP\}/$conf_v_proxy_ip/g;
- $conf =~ s/\$\{PROXY_PORT\}/$conf_v_proxy_port/g;
- $conf =~ s/\$\{HOME\}/$d->{'home'}/g;
+ %conf_vars= (
+ '${DOM}' => $d->{'dom'},
+ '${IP}' => $conf_v_nginx_ip,
+ '${PORT}' => $conf_v_nginx_port,
+ '${PROXY_IP}' => $conf_v_proxy_ip,
+ '${PROXY_PORT}' => $conf_v_proxy_port,
+ '${HOME}' => $d->{'home'},
+ '${PUBLIC_HTML_PATH}' => $d->{'public_html_path'},
+ );
+
+ while(($key,$value) = each %conf_vars) {
+ $key = quotemeta($key);
+ $conf =~ s/$key/$value/g;
+ }
print($file $conf);
Please sign in to comment.
Something went wrong with that request. Please try again.