Browse Source

Fix virtualconf.mustache

master
Prabuddha Chakraborty 9 years ago
parent
commit
f5072f622d
  1. 7
      ee/cli/plugins/site_functions.py
  2. 6
      ee/cli/plugins/stack.py
  3. 49
      ee/cli/templates/virtualconf-php7.mustache
  4. 2
      ee/cli/templates/virtualconf.mustache
  5. 1
      ee/core/variables.py

7
ee/cli/plugins/site_functions.py

@ -68,8 +68,11 @@ def setupdomain(self, data):
ee_site_nginx_conf = open('/etc/nginx/sites-available/{0}' ee_site_nginx_conf = open('/etc/nginx/sites-available/{0}'
.format(ee_domain_name), encoding='utf-8', .format(ee_domain_name), encoding='utf-8',
mode='w') mode='w')
if not data['php7']:
self.app.render((data), 'virtualconf.mustache', self.app.render((data), 'virtualconf.mustache',
out=ee_site_nginx_conf)
else:
self.app.render((data), 'virtualconf-php7.mustache',
out=ee_site_nginx_conf) out=ee_site_nginx_conf)
ee_site_nginx_conf.close() ee_site_nginx_conf.close()
except IOError as e: except IOError as e:

6
ee/cli/plugins/stack.py

@ -2387,7 +2387,8 @@ class EEStackController(CementBaseController):
self.app.pargs.web = True self.app.pargs.web = True
self.app.pargs.admin = True self.app.pargs.admin = True
self.app.pargs.mail = True self.app.pargs.mail = True
self.app.pargs.php7 = True if EEVariables.ee_platform_codename == 'trusty':
self.app.pargs.php7 = True
if self.app.pargs.web: if self.app.pargs.web:
self.app.pargs.nginx = True self.app.pargs.nginx = True
@ -2547,7 +2548,8 @@ class EEStackController(CementBaseController):
self.app.pargs.web = True self.app.pargs.web = True
self.app.pargs.admin = True self.app.pargs.admin = True
self.app.pargs.mail = True self.app.pargs.mail = True
self.app.pargs.php7 = True if EEVariables.ee_platform_codename == 'trusty':
self.app.pargs.php7 = True
if self.app.pargs.web: if self.app.pargs.web:
self.app.pargs.nginx = True self.app.pargs.nginx = True

49
ee/cli/templates/virtualconf-php7.mustache

@ -0,0 +1,49 @@
server {
{{#multisite}}
# Uncomment the following line for domain mapping
# listen 80 default_server;
{{/multisite}}
server_name {{^vma}}{{^rc}}{{site_name}}{{/rc}}{{/vma}} {{#vma}}vma.*{{/vma}} {{#rc}}webmail.*{{/rc}} {{^vma}}{{^rc}}{{#multisite}}*{{/multisite}}{{^multisite}}www{{/multisite}}.{{site_name}}{{/rc}}{{/vma}};
{{#multisite}}
# Uncomment the following line for domain mapping
#server_name_in_redirect off;
{{/multisite}}
access_log /var/log/nginx/{{site_name}}.access.log {{^wpredis}}{{^static}}rt_cache{{/static}}{{/wpredis}}{{#wpredis}}rt_cache_redis{{/wpredis}};
error_log /var/log/nginx/{{site_name}}.error.log;
{{#proxy}}
add_header X-Proxy-Cache $upstream_cache_status;
location / {
proxy_pass http://{{host}}:{{port}};
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
{{/proxy}}
{{^proxy}}
{{^vma}}{{^rc}}root {{webroot}}/htdocs;{{/rc}}{{/vma}}
{{#vma}}root /var/www/22222/htdocs/vimbadmin/public;{{/vma}}
{{#rc}}root /var/www/roundcubemail/htdocs/;{{/rc}}
{{^proxy}}index {{^static}}index.php{{/static}} index.html index.htm;{{/proxy}}
{{#static}}
location / {
try_files $uri $uri/ =404;
}
{{/static}}
{{^static}}include {{^hhvm}}{{#basic}}common/php7.conf;{{/basic}}{{#w3tc}}common/w3tc-php7.conf;{{/w3tc}}{{#wpfc}}common/wpfc-php7.conf;{{/wpfc}} {{#wpsc}}common/wpsc-php7.conf;{{/wpsc}}{{#wpredis}}common/redis-php7.conf;{{/wpredis}} {{/hhvm}}{{#hhvm}}{{#basic}}common/php-hhvm.conf;{{/basic}}{{#w3tc}}common/w3tc-hhvm.conf;{{/w3tc}}{{#wpfc}}common/wpfc-hhvm.conf;{{/wpfc}} {{#wpsc}}common/wpsc-hhvm.conf;{{/wpsc}}{{#wpredis}}common/redis-hhvm.conf;{{/wpredis}} {{/hhvm}}
{{#wpsubdir}}include common/wpsubdir.conf;{{/wpsubdir}}{{/static}}
{{#wp}}include common/wpcommon.conf;{{/wp}}
{{^proxy}}include common/locations.conf;{{/proxy}}
{{^vma}}{{^rc}}include {{webroot}}/conf/nginx/*.conf;{{/rc}}{{/vma}}
{{/proxy}}
}

2
ee/cli/templates/virtualconf.mustache

@ -40,7 +40,7 @@ server {
} }
{{/static}} {{/static}}
{{^static}}include {{^php7}}{{^hhvm}}{{#basic}}common/php.conf;{{/basic}}{{#w3tc}}common/w3tc.conf;{{/w3tc}}{{#wpfc}}common/wpfc.conf;{{/wpfc}} {{#wpsc}}common/wpsc.conf;{{/wpsc}}{{#wpredis}}common/redis.conf;{{/wpredis}} {{/hhvm}}{{#hhvm}}{{#basic}}common/php-hhvm.conf;{{/basic}}{{#w3tc}}common/w3tc-hhvm.conf;{{/w3tc}}{{#wpfc}}common/wpfc-hhvm.conf;{{/wpfc}} {{#wpsc}}common/wpsc-hhvm.conf;{{/wpsc}}{{#wpredis}}common/redis-hhvm.conf;{{/wpredis}} {{/hhvm}}{{/php7}} {{#php7}}{{^hhvm}}{{#basic}}common/php7.conf;{{/basic}}{{#w3tc}}common/w3tc-php7.conf;{{/w3tc}}{{#wpfc}}common/wpfc-php7.conf;{{/wpfc}} {{#wpsc}}common/wpsc-php7.conf;{{/wpsc}}{{#wpredis}}common/redis-php7.conf;{{/wpredis}} {{/hhvm}}{{#hhvm}}{{#basic}}common/php-hhvm.conf;{{/basic}}{{#w3tc}}common/w3tc-hhvm.conf;{{/w3tc}}{{#wpfc}}common/wpfc-hhvm.conf;{{/wpfc}} {{#wpsc}}common/wpsc-hhvm.conf;{{/wpsc}}{{#wpredis}}common/redis-hhvm.conf;{{/wpredis}} {{/hhvm}}{{/php7}} {{^static}}include {{^hhvm}}{{#basic}}common/php.conf;{{/basic}}{{#w3tc}}common/w3tc.conf;{{/w3tc}}{{#wpfc}}common/wpfc.conf;{{/wpfc}} {{#wpsc}}common/wpsc.conf;{{/wpsc}}{{#wpredis}}common/redis.conf;{{/wpredis}} {{/hhvm}}{{#hhvm}}{{#basic}}common/php-hhvm.conf;{{/basic}}{{#w3tc}}common/w3tc-hhvm.conf;{{/w3tc}}{{#wpfc}}common/wpfc-hhvm.conf;{{/wpfc}} {{#wpsc}}common/wpsc-hhvm.conf;{{/wpsc}}{{#wpredis}}common/redis-hhvm.conf;{{/wpredis}} {{/hhvm}}
{{#wpsubdir}}include common/wpsubdir.conf;{{/wpsubdir}}{{/static}} {{#wpsubdir}}include common/wpsubdir.conf;{{/wpsubdir}}{{/static}}
{{#wp}}include common/wpcommon.conf;{{/wp}} {{#wp}}include common/wpcommon.conf;{{/wp}}
{{^proxy}}include common/locations.conf;{{/proxy}} {{^proxy}}include common/locations.conf;{{/proxy}}

1
ee/core/variables.py

@ -128,6 +128,7 @@ class EEVariables():
"php7.0-mcrypt", "php7.0-common", "php7.0-readline", "php7.0-mcrypt", "php7.0-common", "php7.0-readline",
"php7.0-mysql", "php7.0-cli", "php-memcached", "php-imagick", "php7.0-mysql", "php7.0-cli", "php-memcached", "php-imagick",
"memcached", "graphviz", "php-pear", "php-xdebug"] "memcached", "graphviz", "php-pear", "php-xdebug"]
ee_php_extra = []
elif ee_platform_distro == 'debian': elif ee_platform_distro == 'debian':
if ee_platform_codename == 'wheezy': if ee_platform_codename == 'wheezy':
ee_php_repo = ("deb http://packages.dotdeb.org {codename}-php56 all" ee_php_repo = ("deb http://packages.dotdeb.org {codename}-php56 all"

Loading…
Cancel
Save