Closed pk-informatics closed 10 years ago
You would have to add this to TEMPLATE_LOCATION
.
Please could you give me an additional hint where i had to add what?
i think you mean nginx.py between line 35-38, but what should i add exactly? => 'root': website.root, on line 37 ?
I mean nginx_templates:184
- this is the location {}
context, where %(path)s
is available
I'll get this error with the changed file:
Ajenti 1.2.18 bug report
--------------------
Detected platform: debian / debian / Debian GNU/Linux 7.4 (wheezy)
Architecture: x86_64 unknown
Python: 2.7.3
Installation: 17503408
Debug: False
Locale: (None, None)
Loaded plugins:
main dashboard services cron tasks configurator network terminal packages exports db_common mysql sensors psql resources fstab resolv codemirror scripts plugins hosts fm users taskmgr webserver_common nginx iptables logs power notepad ajenti_org vh vh-php-fpm vh-mysql vh-nginx vh-vsftpd vh-mail
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/ajenti/plugins/main/main.py", line 106, in handle_message
self.ui.dispatch_event(update['uid'], update['event'], update['params'])
File "/usr/lib/pymodules/python2.7/ajenti/ui/__init__.py", line 73, in dispatch_event
self.root.dispatch_event(uid, event, params)
File "/usr/lib/pymodules/python2.7/ajenti/ui/element.py", line 361, in dispatch_event
if child.dispatch_event(uid, event, params):
File "/usr/lib/pymodules/python2.7/ajenti/ui/element.py", line 361, in dispatch_event
if child.dispatch_event(uid, event, params):
File "/usr/lib/pymodules/python2.7/ajenti/ui/element.py", line 367, in dispatch_event
getattr(self, k)(**(params or {}))
File "/var/lib/ajenti/plugins/vh/main.py", line 224, in save
self.manager.update_configuration()
File "/var/lib/ajenti/plugins/vh/api.py", line 207, in update_configuration
self.webserver.create_configuration(self.config)
File "/var/lib/ajenti/plugins/vh-nginx/nginx.py", line 111, in create_configuration
.write(self.__generate_website_config(website))
File "/var/lib/ajenti/plugins/vh-nginx/nginx.py", line 91, in __generate_website_config
) if not website.maintenance_mode else '',
File "/var/lib/ajenti/plugins/vh-nginx/nginx.py", line 90, in <genexpr>
'\n'.join(self.__generate_website_location(website, location) for location in website.locations)
File "/var/lib/ajenti/plugins/vh-nginx/nginx.py", line 69, in __generate_website_location
'content': content,
KeyError: u'root'
http://ajenti.org/catcher/view/4679
Log content:
2014-03-10 15:44:08,721 INFO ajenti-panel.<module>(): Using config file /etc/ajenti/config.json
2014-03-10 15:44:08,879 INFO registry.register_crypt_handler(): registered crypt handler 'sha512_crypt': <class 'passlib.handlers.sha2_crypt.sha512_crypt'>
2014-03-10 15:44:08,933 WARNING core.run(): Couldn't set default locale
2014-03-10 15:44:08,934 INFO core.run(): Ajenti 1.2.18 running on platform: debian
2014-03-10 15:44:08,934 DEBUG __init__.load(): Loading plugin services
2014-03-10 15:44:08,935 DEBUG __init__.load_recursive(): Preloading plugin dependency: main
2014-03-10 15:44:08,935 DEBUG __init__.load(): Loading plugin main
2014-03-10 15:44:08,941 DEBUG __init__.load(): Loading plugin services
2014-03-10 15:44:08,941 DEBUG __init__.load_recursive(): Preloading plugin dependency: dashboard
2014-03-10 15:44:08,941 DEBUG __init__.load(): Loading plugin dashboard
2014-03-10 15:44:08,943 DEBUG __init__.load(): Loading plugin services
2014-03-10 15:44:08,951 DEBUG __init__.load(): Loading plugin tasks
2014-03-10 15:44:08,951 DEBUG __init__.load_recursive(): Preloading plugin dependency: cron
2014-03-10 15:44:08,951 DEBUG __init__.load(): Loading plugin cron
2014-03-10 15:44:08,951 DEBUG compat.Popen(): Popen: ['which', 'crontab']
2014-03-10 15:44:08,956 DEBUG __init__.load(): Loading plugin tasks
2014-03-10 15:44:08,965 DEBUG __init__.load(): Loading plugin configurator
2014-03-10 15:44:08,966 DEBUG __init__.load(): Loading plugin network
2014-03-10 15:44:08,985 DEBUG __init__.load(): Loading plugin megaraid
2014-03-10 15:44:08,985 WARNING __init__.load(): *** [megaraid] skipping due to FileDependency (/opt/MegaRAID/MegaCli/MegaCli)
2014-03-10 15:44:08,985 DEBUG __init__.load(): Loading plugin squid
2014-03-10 15:44:08,986 DEBUG compat.Popen(): Popen: ['which', 'squid3']
2014-03-10 15:44:08,990 WARNING __init__.load(): *** [squid] skipping due to BinaryDependency (squid3)
2014-03-10 15:44:08,991 DEBUG __init__.load(): Loading plugin packages
2014-03-10 15:44:08,991 DEBUG __init__.load_recursive(): Preloading plugin dependency: terminal
2014-03-10 15:44:08,991 DEBUG __init__.load(): Loading plugin terminal
2014-03-10 15:44:09,002 DEBUG __init__.load(): Loading plugin packages
2014-03-10 15:44:09,004 DEBUG __init__.load(): Loading plugin exports
2014-03-10 15:44:09,005 DEBUG compat.Popen(): Popen: ['which', 'nfsstat']
2014-03-10 15:44:09,011 DEBUG __init__.load(): Loading plugin samba
2014-03-10 15:44:09,012 DEBUG compat.Popen(): Popen: ['which', 'smbd']
2014-03-10 15:44:09,017 WARNING __init__.load(): *** [samba] skipping due to BinaryDependency (smbd)
2014-03-10 15:44:09,018 DEBUG __init__.load(): Loading plugin lm_sensors
2014-03-10 15:44:09,018 DEBUG compat.Popen(): Popen: ['which', 'sensors']
2014-03-10 15:44:09,022 WARNING __init__.load(): *** [lm_sensors] skipping due to BinaryDependency (sensors)
2014-03-10 15:44:09,023 DEBUG __init__.load(): Loading plugin hdparm
2014-03-10 15:44:09,023 DEBUG compat.Popen(): Popen: ['which', 'hdparm']
2014-03-10 15:44:09,027 WARNING __init__.load(): *** [hdparm] skipping due to BinaryDependency (hdparm)
2014-03-10 15:44:09,028 DEBUG __init__.load(): Loading plugin ipmi
2014-03-10 15:44:09,028 DEBUG compat.Popen(): Popen: ['which', 'ipmitool']
2014-03-10 15:44:09,032 WARNING __init__.load(): *** [ipmi] skipping due to BinaryDependency (ipmitool)
2014-03-10 15:44:09,032 DEBUG __init__.load(): Loading plugin mysql
2014-03-10 15:44:09,033 DEBUG __init__.load_recursive(): Preloading plugin dependency: db_common
2014-03-10 15:44:09,033 DEBUG __init__.load(): Loading plugin db_common
2014-03-10 15:44:09,034 DEBUG __init__.load(): Loading plugin mysql
2014-03-10 15:44:09,034 DEBUG compat.Popen(): Popen: ['which', 'mysql']
2014-03-10 15:44:09,039 DEBUG compat.Popen(): Popen: ['which', 'mysqld_safe']
2014-03-10 15:44:09,044 DEBUG __init__.load(): Loading plugin netatalk
2014-03-10 15:44:09,045 DEBUG compat.Popen(): Popen: ['which', 'afpd']
2014-03-10 15:44:09,049 WARNING __init__.load(): *** [netatalk] skipping due to BinaryDependency (afpd)
2014-03-10 15:44:09,049 DEBUG __init__.load(): Loading plugin nsd
2014-03-10 15:44:09,050 DEBUG compat.Popen(): Popen: ['which', 'nsd']
2014-03-10 15:44:09,054 WARNING __init__.load(): *** [nsd] skipping due to BinaryDependency (nsd)
2014-03-10 15:44:09,054 DEBUG __init__.load(): Loading plugin raid
2014-03-10 15:44:09,055 DEBUG compat.Popen(): Popen: ['which', 'mdadm']
2014-03-10 15:44:09,059 WARNING __init__.load(): *** [raid] skipping due to BinaryDependency (mdadm)
2014-03-10 15:44:09,060 DEBUG __init__.load(): Loading plugin ctdb
2014-03-10 15:44:09,061 DEBUG compat.Popen(): Popen: ['which', 'ctdb']
2014-03-10 15:44:09,068 WARNING __init__.load(): *** [ctdb] skipping due to BinaryDependency (ctdb)
2014-03-10 15:44:09,068 DEBUG __init__.load(): Loading plugin sensors
2014-03-10 15:44:09,071 DEBUG __init__.load(): Loading plugin psql
2014-03-10 15:44:09,071 DEBUG compat.Popen(): Popen: ['which', 'psql']
2014-03-10 15:44:09,077 DEBUG __init__.load(): Loading plugin dhcpd
2014-03-10 15:44:09,077 DEBUG compat.Popen(): Popen: ['which', 'dhcpd']
2014-03-10 15:44:09,081 WARNING __init__.load(): *** [dhcpd] skipping due to BinaryDependency (dhcpd)
2014-03-10 15:44:09,081 DEBUG __init__.load(): Loading plugin resources
2014-03-10 15:44:09,085 DEBUG __init__.load(): Loading plugin smartctl
2014-03-10 15:44:09,085 DEBUG compat.Popen(): Popen: ['which', 'smartctl']
2014-03-10 15:44:09,089 WARNING __init__.load(): *** [smartctl] skipping due to BinaryDependency (smartctl)
2014-03-10 15:44:09,090 DEBUG __init__.load(): Loading plugin fstab
2014-03-10 15:44:09,092 DEBUG __init__.load(): Loading plugin resolv
2014-03-10 15:44:09,092 DEBUG __init__.load(): Loading plugin codemirror
2014-03-10 15:44:09,093 DEBUG __init__.load(): Loading plugin scripts
2014-03-10 15:44:09,093 DEBUG __init__.load(): Loading plugin plugins
2014-03-10 15:44:09,093 DEBUG __init__.load(): Loading plugin munin
2014-03-10 15:44:09,094 DEBUG compat.Popen(): Popen: ['which', 'munin-cron']
2014-03-10 15:44:09,097 WARNING __init__.load(): *** [munin] skipping due to BinaryDependency (munin-cron)
2014-03-10 15:44:09,098 DEBUG __init__.load(): Loading plugin hosts
2014-03-10 15:44:09,099 DEBUG __init__.load(): Loading plugin fm
2014-03-10 15:44:09,100 DEBUG __init__.load(): Loading plugin users
2014-03-10 15:44:09,101 DEBUG __init__.load(): Loading plugin taskmgr
2014-03-10 15:44:09,102 DEBUG __init__.load(): Loading plugin memcache
2014-03-10 15:44:09,102 DEBUG compat.Popen(): Popen: ['which', 'memcached']
2014-03-10 15:44:09,106 WARNING __init__.load(): *** [memcache] skipping due to BinaryDependency (memcached)
2014-03-10 15:44:09,107 DEBUG __init__.load(): Loading plugin nginx
2014-03-10 15:44:09,108 DEBUG __init__.load_recursive(): Preloading plugin dependency: webserver_common
2014-03-10 15:44:09,108 DEBUG __init__.load(): Loading plugin webserver_common
2014-03-10 15:44:09,109 DEBUG __init__.load(): Loading plugin nginx
2014-03-10 15:44:09,109 DEBUG compat.Popen(): Popen: ['which', 'nginx']
2014-03-10 15:44:09,115 DEBUG __init__.load(): Loading plugin iptables
2014-03-10 15:44:09,116 DEBUG __init__.load(): Loading plugin logs
2014-03-10 15:44:09,117 DEBUG __init__.load(): Loading plugin bind9
2014-03-10 15:44:09,117 DEBUG compat.Popen(): Popen: ['which', 'named']
2014-03-10 15:44:09,122 WARNING __init__.load(): *** [bind9] skipping due to BinaryDependency (named)
2014-03-10 15:44:09,123 DEBUG __init__.load(): Loading plugin power
2014-03-10 15:44:09,124 DEBUG __init__.load(): Loading plugin notepad
2014-03-10 15:44:09,124 DEBUG __init__.load(): Loading plugin ajenti_org
2014-03-10 15:44:09,125 DEBUG __init__.load(): Loading plugin openvpn
2014-03-10 15:44:09,126 DEBUG compat.Popen(): Popen: ['which', 'openvpn']
2014-03-10 15:44:09,130 WARNING __init__.load(): *** [openvpn] skipping due to BinaryDependency (openvpn)
2014-03-10 15:44:09,131 DEBUG __init__.load(): Loading plugin supervisor
2014-03-10 15:44:09,131 DEBUG compat.Popen(): Popen: ['which', 'supervisord']
2014-03-10 15:44:09,136 WARNING __init__.load(): *** [supervisor] skipping due to BinaryDependency (supervisord)
2014-03-10 15:44:09,137 DEBUG __init__.load(): Loading plugin apache
2014-03-10 15:44:09,137 DEBUG compat.Popen(): Popen: ['which', 'apache2']
2014-03-10 15:44:09,141 WARNING __init__.load(): *** [apache] skipping due to BinaryDependency (apache2)
2014-03-10 15:44:09,141 DEBUG __init__.load(): Loading plugin apcups
2014-03-10 15:44:09,142 DEBUG compat.Popen(): Popen: ['which', 'apcaccess']
2014-03-10 15:44:09,146 WARNING __init__.load(): *** [apcups] skipping due to BinaryDependency (apcaccess)
2014-03-10 15:44:09,147 DEBUG __init__.load(): Loading plugin elements
2014-03-10 15:44:09,147 WARNING __init__.load(): *** [elements] Plugin error: format error
2014-03-10 15:44:09,147 DEBUG __init__.load(): Loading plugin hddtemp
2014-03-10 15:44:09,148 DEBUG compat.Popen(): Popen: ['which', 'hddtemp']
2014-03-10 15:44:09,152 WARNING __init__.load(): *** [hddtemp] skipping due to BinaryDependency (hddtemp)
2014-03-10 15:44:09,152 DEBUG __init__.load(): Loading plugin vh-php-fpm
2014-03-10 15:44:09,153 DEBUG __init__.load_recursive(): Preloading plugin dependency: vh
2014-03-10 15:44:09,153 DEBUG __init__.load(): Loading plugin vh
2014-03-10 15:44:09,155 DEBUG __init__.load(): Loading plugin vh-php-fpm
2014-03-10 15:44:09,155 DEBUG compat.Popen(): Popen: ['which', 'php5-fpm']
2014-03-10 15:44:09,160 DEBUG __init__.load(): Loading plugin vh-mysql
2014-03-10 15:44:09,160 DEBUG compat.Popen(): Popen: ['which', 'mysql']
2014-03-10 15:44:09,164 DEBUG compat.Popen(): Popen: ['which', 'mysqld']
2014-03-10 15:44:09,169 DEBUG __init__.load(): Loading plugin vh-nginx
2014-03-10 15:44:09,170 DEBUG __init__.load(): Loading plugin vh-vsftpd
2014-03-10 15:44:09,170 DEBUG compat.Popen(): Popen: ['which', 'vsftpd']
2014-03-10 15:44:09,175 DEBUG __init__.load(): Loading plugin vh-mail
2014-03-10 15:44:09,216 DEBUG __init__.instantiate(): Root context instantiated [Inflater] <ajenti.ui.inflater.Inflater object at 0x1602890>
2014-03-10 15:44:09,217 DEBUG __init__.instantiate(): Root context instantiated [UI] <ajenti.ui.UI object at 0x1a40ed0>
2014-03-10 15:44:09,217 DEBUG inflater.precache(): Precaching layout main:file-dialog-save
2014-03-10 15:44:09,218 DEBUG inflater.precache(): Precaching layout main:input-dialog
2014-03-10 15:44:09,219 DEBUG inflater.precache(): Precaching layout main:file-dialog
2014-03-10 15:44:09,219 DEBUG inflater.precache(): Precaching layout dashboard:text
2014-03-10 15:44:09,220 DEBUG inflater.precache(): Precaching layout dashboard:dash
2014-03-10 15:44:09,221 DEBUG inflater.precache(): Precaching layout dashboard:welcome
2014-03-10 15:44:09,221 DEBUG inflater.precache(): Precaching layout services:widget
2014-03-10 15:44:09,223 DEBUG inflater.precache(): Precaching layout services:bar
2014-03-10 15:44:09,223 DEBUG inflater.precache(): Precaching layout services:main
2014-03-10 15:44:09,225 DEBUG inflater.precache(): Precaching layout cron:main
2014-03-10 15:44:09,230 DEBUG inflater.precache(): Precaching layout tasks:params-copydir
2014-03-10 15:44:09,238 DEBUG inflater.precache(): Precaching layout tasks:params-rsync
2014-03-10 15:44:09,245 DEBUG inflater.precache(): Precaching layout tasks:main
2014-03-10 15:44:09,254 DEBUG inflater.precache(): Precaching layout tasks:params-execute
2014-03-10 15:44:09,255 DEBUG inflater.precache(): Precaching layout configurator:main
2014-03-10 15:44:09,263 DEBUG inflater.precache(): Precaching layout configurator:ad-sync-config
2014-03-10 15:44:09,264 DEBUG inflater.precache(): Precaching layout configurator:ldap-sync-config
2014-03-10 15:44:09,267 DEBUG inflater.precache(): Precaching layout network:widget
2014-03-10 15:44:09,268 DEBUG inflater.precache(): Precaching layout network:bit-linux-ipv4
2014-03-10 15:44:09,269 DEBUG inflater.precache(): Precaching layout network:bit-linux-ifupdown
2014-03-10 15:44:09,269 DEBUG inflater.precache(): Precaching layout network:bit-linux-basic
2014-03-10 15:44:09,270 DEBUG inflater.precache(): Precaching layout network:main
2014-03-10 15:44:09,272 DEBUG inflater.precache(): Precaching layout network:bit-linux-dhcp
2014-03-10 15:44:09,273 DEBUG inflater.precache(): Precaching layout terminal:main
2014-03-10 15:44:09,274 DEBUG inflater.precache(): Precaching layout terminal:config
2014-03-10 15:44:09,274 DEBUG inflater.precache(): Precaching layout packages:headers
2014-03-10 15:44:09,275 DEBUG inflater.precache(): Precaching layout packages:row
2014-03-10 15:44:09,275 DEBUG inflater.precache(): Precaching layout packages:main
2014-03-10 15:44:09,278 DEBUG inflater.precache(): Precaching layout packages:installer
2014-03-10 15:44:09,279 DEBUG inflater.precache(): Precaching layout exports:main
2014-03-10 15:44:09,284 DEBUG inflater.precache(): Precaching layout db_common:main
2014-03-10 15:44:09,287 DEBUG inflater.precache(): Precaching layout mysql:config
2014-03-10 15:44:09,288 DEBUG inflater.precache(): Precaching layout sensors:cpu-line
2014-03-10 15:44:09,288 DEBUG inflater.precache(): Precaching layout sensors:value-widget
2014-03-10 15:44:09,289 DEBUG inflater.precache(): Precaching layout sensors:progressbar-widget
2014-03-10 15:44:09,289 DEBUG inflater.precache(): Precaching layout sensors:cpu-widget
2014-03-10 15:44:09,290 DEBUG inflater.precache(): Precaching layout fstab:iio-widget
2014-03-10 15:44:09,291 DEBUG inflater.precache(): Precaching layout fstab:widget
2014-03-10 15:44:09,292 DEBUG inflater.precache(): Precaching layout fstab:free-widget
2014-03-10 15:44:09,293 DEBUG inflater.precache(): Precaching layout fstab:main
2014-03-10 15:44:09,302 DEBUG inflater.precache(): Precaching layout resolv:main
2014-03-10 15:44:09,305 DEBUG inflater.precache(): Precaching layout scripts:widget
2014-03-10 15:44:09,311 DEBUG inflater.precache(): Precaching layout plugins:main
2014-03-10 15:44:09,321 DEBUG inflater.precache(): Precaching layout hosts:main
2014-03-10 15:44:09,324 DEBUG inflater.precache(): Precaching layout fm:main
2014-03-10 15:44:09,333 DEBUG inflater.precache(): Precaching layout fm:config
2014-03-10 15:44:09,335 DEBUG inflater.precache(): Precaching layout users:user-list
2014-03-10 15:44:09,341 DEBUG inflater.precache(): Precaching layout users:main
2014-03-10 15:44:09,353 DEBUG inflater.precache(): Precaching layout taskmgr:main
2014-03-10 15:44:09,357 DEBUG inflater.precache(): Precaching layout webserver_common:main
2014-03-10 15:44:09,360 DEBUG inflater.precache(): Precaching layout iptables:option-port
2014-03-10 15:44:09,361 DEBUG inflater.precache(): Precaching layout iptables:option-interface
2014-03-10 15:44:09,362 DEBUG inflater.precache(): Precaching layout iptables:option-state
2014-03-10 15:44:09,363 DEBUG inflater.precache(): Precaching layout iptables:option-custom
2014-03-10 15:44:09,364 DEBUG inflater.precache(): Precaching layout iptables:main
2014-03-10 15:44:09,369 DEBUG inflater.precache(): Precaching layout iptables:option
2014-03-10 15:44:09,370 DEBUG inflater.precache(): Precaching layout iptables:option-ports
2014-03-10 15:44:09,371 DEBUG inflater.precache(): Precaching layout iptables:option-match
2014-03-10 15:44:09,372 DEBUG inflater.precache(): Precaching layout iptables:option-address
2014-03-10 15:44:09,373 DEBUG inflater.precache(): Precaching layout iptables:option-protocol
2014-03-10 15:44:09,374 DEBUG inflater.precache(): Precaching layout iptables:option-reject-with
2014-03-10 15:44:09,374 DEBUG inflater.precache(): Precaching layout logs:main
2014-03-10 15:44:09,381 DEBUG inflater.precache(): Precaching layout power:widget
2014-03-10 15:44:09,382 DEBUG inflater.precache(): Precaching layout notepad:main
2014-03-10 15:44:09,421 DEBUG inflater.precache(): Precaching layout notepad:listitem
2014-03-10 15:44:09,422 DEBUG inflater.precache(): Precaching layout notepad:config
2014-03-10 15:44:09,422 DEBUG inflater.precache(): Precaching layout ajenti_org:main
2014-03-10 15:44:09,424 DEBUG inflater.precache(): Precaching layout ajenti_org:config
2014-03-10 15:44:09,425 DEBUG inflater.precache(): Precaching layout vh:main-backend-params-proxy
2014-03-10 15:44:09,425 DEBUG inflater.precache(): Precaching layout vh:not-configured
2014-03-10 15:44:09,427 DEBUG inflater.precache(): Precaching layout vh:main-website-location
2014-03-10 15:44:09,440 DEBUG inflater.precache(): Precaching layout vh:main-backend-params-ruby-nodejs
2014-03-10 15:44:09,442 DEBUG inflater.precache(): Precaching layout vh:main-backend-params-ruby-puma
2014-03-10 15:44:09,444 DEBUG inflater.precache(): Precaching layout vh:main-website
2014-03-10 15:44:09,492 DEBUG inflater.precache(): Precaching layout vh:main
2014-03-10 15:44:09,495 DEBUG inflater.precache(): Precaching layout vh:main-backend-params-python-wsgi
2014-03-10 15:44:09,504 DEBUG inflater.precache(): Precaching layout vh:main-backend-params-php-fcgi
2014-03-10 15:44:09,505 DEBUG inflater.precache(): Precaching layout vh:main-backend-params-static
2014-03-10 15:44:09,505 DEBUG inflater.precache(): Precaching layout vh:main-backend-params-ruby-unicorn
2014-03-10 15:44:09,506 DEBUG inflater.precache(): Precaching layout vh-mysql:ext
2014-03-10 15:44:09,507 DEBUG inflater.precache(): Precaching layout vh-vsftpd:ext
2014-03-10 15:44:09,508 DEBUG inflater.precache(): Precaching layout vh-mail:not-configured
2014-03-10 15:44:09,509 DEBUG inflater.precache(): Precaching layout vh-mail:main
2014-03-10 15:44:09,512 INFO core.run(): Starting server on (u'0.0.0.0', 8000)
2014-03-10 15:44:09,518 DEBUG __init__.instantiate(): Root context instantiated [SessionMiddleware] <ajenti.middleware.SessionMiddleware object at 0x2bb3690>
2014-03-10 15:44:09,519 DEBUG __init__.instantiate(): Root context instantiated [AuthenticationMiddleware] <ajenti.middleware.AuthenticationMiddleware object at 0x2bb6050>
2014-03-10 15:44:09,519 DEBUG __init__.instantiate(): Root context instantiated [CentralDispatcher] <ajenti.routing.CentralDispatcher object at 0x2bb6610>
2014-03-10 15:44:09,520 DEBUG __init__.instantiate(): Root context instantiated [IPCServer] <ajenti.ipc.IPCServer object at 0x2bb6790>
2014-03-10 15:44:09,521 DEBUG feedback.send(): Feedback >> ping ({'edition': 'vanilla+vh', 'version': '1.2.18', 'os': 'debian', 'id': 31512})
2014-03-10 15:44:09,616 DEBUG feedback.send(): Feedback << {"status": "ok"}
2014-03-10 15:44:12,265 DEBUG __init__.instantiate(): Root context instantiated [MainServer] <ajenti.plugins.main.main.MainServer object at 0x2be8610>
2014-03-10 15:44:12,267 DEBUG __init__.instantiate(): Root context instantiated [TerminalHttp] <ajenti.plugins.terminal.main.TerminalHttp object at 0x2be8650>
2014-03-10 15:44:12,267 DEBUG __init__.instantiate(): Root context instantiated [ContentServer] <ajenti.plugins.resources.server.ContentServer object at 0x2be86d0>
2014-03-10 15:44:12,268 DEBUG __init__.instantiate(): Root context instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2be8710>
2014-03-10 15:44:12,862 DEBUG __init__.instantiate(): Root context instantiated [ContentServer] <ajenti.plugins.resources.server.ContentServer object at 0x2be88d0>
2014-03-10 15:44:12,862 DEBUG __init__.instantiate(): Root context instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2be8850>
2014-03-10 15:44:12,871 DEBUG __init__.instantiate(): Root context instantiated [ContentCompressor] <ajenti.plugins.resources.server.ContentCompressor object at 0x2d27050>
2014-03-10 15:44:12,942 DEBUG __init__.instantiate(): Root context instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2d271d0>
2014-03-10 15:44:13,599 DEBUG __init__.instantiate(): Root context instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2d27450>
2014-03-10 15:44:13,697 DEBUG __init__.instantiate(): Root context instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2d27690>
2014-03-10 15:44:17,166 DEBUG __init__.instantiate(): Root context instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2d277d0>
2014-03-10 15:44:17,169 DEBUG __init__.instantiate(): Root context instantiated [UserManager] <ajenti.users.UserManager object at 0x2d33590>
2014-03-10 15:44:17,172 DEBUG __init__.instantiate(): Root context instantiated [ActiveDirectorySyncProvider] <ajenti.usersync.adsync.ActiveDirectorySyncProvider object at 0x2d33ed0>
2014-03-10 15:44:17,174 DEBUG __init__.instantiate(): Root context instantiated [AjentiSyncProvider] <ajenti.usersync.local.AjentiSyncProvider object at 0x2d33f10>
2014-03-10 15:44:17,217 INFO users.check_password(): user root logged in through AjentiSyncProvider
2014-03-10 15:44:17,669 DEBUG __init__.instantiate(): Context for root instantiated [MainServer] <ajenti.plugins.main.main.MainServer object at 0x2d277d0>
2014-03-10 15:44:17,671 DEBUG __init__.instantiate(): Context for root instantiated [TerminalHttp] <ajenti.plugins.terminal.main.TerminalHttp object at 0x2d27810>
2014-03-10 15:44:17,671 DEBUG __init__.instantiate(): Context for root instantiated [ContentServer] <ajenti.plugins.resources.server.ContentServer object at 0x2d3a0d0>
2014-03-10 15:44:17,671 DEBUG __init__.instantiate(): Context for root instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2d3a090>
2014-03-10 15:44:18,200 DEBUG __init__.instantiate(): Context for root instantiated [MainServer] <ajenti.plugins.main.main.MainServer object at 0x2bc74d0>
2014-03-10 15:44:18,201 DEBUG __init__.instantiate(): Context for root instantiated [TerminalHttp] <ajenti.plugins.terminal.main.TerminalHttp object at 0x2bc7490>
2014-03-10 15:44:18,201 DEBUG __init__.instantiate(): Context for root instantiated [ContentServer] <ajenti.plugins.resources.server.ContentServer object at 0x2bc7510>
2014-03-10 15:44:18,201 DEBUG __init__.instantiate(): Context for root instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2d27810>
2014-03-10 15:44:18,207 DEBUG __init__.instantiate(): Context for root instantiated [ContentCompressor] <ajenti.plugins.resources.server.ContentCompressor object at 0x2d277d0>
2014-03-10 15:44:18,247 DEBUG __init__.instantiate(): Context for root instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2d27150>
2014-03-10 15:44:18,259 DEBUG __init__.instantiate(): Context for root instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2d27690>
2014-03-10 15:44:18,904 DEBUG __init__.instantiate(): Context for root instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2be88d0>
2014-03-10 15:44:18,906 DEBUG __init__.instantiate(): Context for root instantiated [UploadReceiver] <ajenti.plugins.fm.fm.UploadReceiver object at 0x2be8710>
2014-03-10 15:44:20,599 DEBUG __init__.instantiate(): Context for root instantiated [UI] <ajenti.ui.UI object at 0x2d48810>
2014-03-10 15:44:20,602 DEBUG __init__.instantiate(): Context for root instantiated [UserManager] <ajenti.users.UserManager object at 0x2d48950>
2014-03-10 15:44:20,631 DEBUG __init__.instantiate(): Context for root instantiated [Dash] <main:section # 7547>
2014-03-10 15:44:20,635 DEBUG __init__.instantiate(): Context for root instantiated [SysVInitServiceManager] <ajenti.plugins.services.sm_sysvinit.SysVInitServiceManager object at 0x2d55b10>
2014-03-10 15:44:20,636 DEBUG __init__.instantiate(): Context for root instantiated [ServiceMultiplexor] <ajenti.plugins.services.api.ServiceMultiplexor object at 0x2d55610>
2014-03-10 15:44:20,636 DEBUG __init__.instantiate(): Context for root instantiated [Services] <main:section # 7643>
2014-03-10 15:44:20,640 DEBUG __init__.instantiate(): Context for root instantiated [Cron] <main:section # 7669>
2014-03-10 15:44:20,647 DEBUG __init__.instantiate(): Root context instantiated [TaskManager] <ajenti.plugins.tasks.manager.TaskManager object at 0x2d58c10>
2014-03-10 15:44:20,648 DEBUG __init__.instantiate(): Context for root instantiated [Tasks] <main:section # 7768>
2014-03-10 15:44:20,656 DEBUG __init__.instantiate(): Context for root instantiated [ClassConfigManager] <ajenti.plugins.configurator.configurator.ClassConfigManager object at 0x2d62490>
2014-03-10 15:44:20,657 DEBUG __init__.instantiate(): Context for root instantiated [Configurator] <main:section # 7904>
2014-03-10 15:44:20,661 DEBUG compat.Popen(): Popen: ['ifconfig', 'lo']
2014-03-10 15:44:20,667 DEBUG compat.Popen(): Popen: ['ifconfig', 'eth0']
2014-03-10 15:44:20,673 DEBUG __init__.instantiate(): Context for root instantiated [DebianNetworkConfig] <ajenti.plugins.network.nc_debian.DebianNetworkConfig object at 0x2d62a50>
2014-03-10 15:44:20,674 DEBUG __init__.instantiate(): Context for root instantiated [NetworkPlugin] <main:section # 8092>
2014-03-10 15:44:20,678 DEBUG __init__.instantiate(): Context for root instantiated [Terminals] <main:section # 8129>
2014-03-10 15:44:20,683 DEBUG __init__.instantiate(): Context for root instantiated [DebianPackageManager] <ajenti.plugins.packages.pm_apt.DebianPackageManager object at 0x2ebf110>
2014-03-10 15:44:20,686 DEBUG __init__.instantiate(): Context for root instantiated [Packages] <main:section # 8144>
2014-03-10 15:44:20,691 DEBUG __init__.instantiate(): Context for root instantiated [Exports] <main:section # 8242>
2014-03-10 15:44:20,697 DEBUG __init__.instantiate(): Context for root instantiated [MySQLDB] <ajenti.plugins.mysql.api.MySQLDB object at 0x2ec7ed0>
2014-03-10 15:44:20,697 DEBUG __init__.instantiate(): Context for root instantiated [MySQLPlugin] <main:section # 8373>
2014-03-10 15:44:20,701 DEBUG __init__.instantiate(): Context for root instantiated [PSQLPlugin] <main:section # 8433>
2014-03-10 15:44:20,707 DEBUG compat.Popen(): Popen: ['df', '-P']
2014-03-10 15:44:20,715 DEBUG __init__.instantiate(): Context for root instantiated [MountsBackend] <ajenti.plugins.fstab.main.MountsBackend object at 0x2ecec10>
2014-03-10 15:44:20,717 DEBUG __init__.instantiate(): Context for root instantiated [Filesystems] <main:section # 8493>
2014-03-10 15:44:20,723 DEBUG __init__.instantiate(): Context for root instantiated [Resolv] <main:section # 8647>
2014-03-10 15:44:20,727 DEBUG __init__.instantiate(): Context for root instantiated [PluginsPlugin] <main:section # 8671>
2014-03-10 15:44:20,731 DEBUG __init__.instantiate(): Context for root instantiated [Hosts] <main:section # 8717>
2014-03-10 15:44:20,736 DEBUG __init__.instantiate(): Context for root instantiated [FMBackend] <ajenti.plugins.fm.backend.FMBackend object at 0x2ed9b90>
2014-03-10 15:44:20,738 DEBUG __init__.instantiate(): Context for root instantiated [FileManager] <main:section # 8754>
2014-03-10 15:44:20,752 DEBUG __init__.instantiate(): Context for root instantiated [LinuxUsersBackend] <ajenti.plugins.users.main.LinuxUsersBackend object at 0x2eebd90>
2014-03-10 15:44:20,753 DEBUG __init__.instantiate(): Context for root instantiated [Users] <main:section # 8877>
2014-03-10 15:44:20,757 DEBUG __init__.instantiate(): Context for root instantiated [TaskManager] <main:section # 9172>
2014-03-10 15:44:20,761 DEBUG __init__.instantiate(): Context for root instantiated [DebianFirewallManager] <ajenti.plugins.iptables.main.DebianFirewallManager object at 0x2ef5710>
2014-03-10 15:44:20,762 DEBUG __init__.instantiate(): Context for root instantiated [Firewall] <main:section # 9217>
2014-03-10 15:44:20,767 DEBUG __init__.instantiate(): Context for root instantiated [Logs] <main:section # 9273>
2014-03-10 15:44:20,781 DEBUG __init__.instantiate(): Context for root instantiated [Notepad] <main:section # 9427>
2014-03-10 15:44:20,786 DEBUG __init__.instantiate(): Context for root instantiated [Static] <ajenti.plugins.vh.gate_static.Static object at 0x3339510>
2014-03-10 15:44:20,786 DEBUG __init__.instantiate(): Context for root instantiated [ProxyPass] <ajenti.plugins.vh.gate_proxy.ProxyPass object at 0x3339550>
2014-03-10 15:44:20,786 DEBUG __init__.instantiate(): Context for root instantiated [PHPFPM] <ajenti.plugins.vh-php-fpm.phpfpm.PHPFPM object at 0x33395d0>
2014-03-10 15:44:20,787 DEBUG __init__.instantiate(): Context for root instantiated [VSFTPD] <ajenti.plugins.vh-vsftpd.vsftpd.VSFTPD object at 0x3339610>
2014-03-10 15:44:20,788 DEBUG __init__.instantiate(): Context for root instantiated [NginxWebserver] <ajenti.plugins.vh-nginx.nginx.NginxWebserver object at 0x33394d0>
2014-03-10 15:44:20,788 DEBUG __init__.instantiate(): Context for root instantiated [VHManager] <ajenti.plugins.vh.api.VHManager object at 0x3334990>
2014-03-10 15:44:20,789 DEBUG __init__.instantiate(): Context for root instantiated [WebsitesPlugin] <main:section # 9823>
2014-03-10 15:44:20,805 DEBUG __init__.instantiate(): Context for root instantiated [WebsiteEditorPlugin] <main:section # 9848>
2014-03-10 15:44:20,810 DEBUG __init__.instantiate(): Context for root instantiated [MailEximCourierBackend] <ajenti.plugins.vh-mail.api.MailEximCourierBackend object at 0x334c410>
2014-03-10 15:44:20,811 DEBUG __init__.instantiate(): Context for root instantiated [MailManager] <ajenti.plugins.vh-mail.api.MailManager object at 0x3349e50>
2014-03-10 15:44:20,812 DEBUG __init__.instantiate(): Context for root instantiated [MailPlugin] <main:section # 10341>
2014-03-10 15:44:20,814 DEBUG __init__.instantiate(): Context for root instantiated [HostnameSensor] <ajenti.plugins.sensors.hostname.HostnameSensor object at 0x3352990>
2014-03-10 15:44:20,819 DEBUG __init__.instantiate(): Context for root instantiated [MemorySensor] <ajenti.plugins.sensors.memory.MemorySensor object at 0x3352d50>
2014-03-10 15:44:20,823 DEBUG __init__.instantiate(): Context for root instantiated [SwapSensor] <ajenti.plugins.sensors.memory.SwapSensor object at 0x3359110>
2014-03-10 15:44:20,831 DEBUG __init__.instantiate(): Context for root instantiated [LinuxUptimeSensor] <ajenti.plugins.sensors.uptime.LinuxUptimeSensor object at 0x33598d0>
2014-03-10 15:44:20,835 DEBUG __init__.instantiate(): Context for root instantiated [PowerSensor] <ajenti.plugins.power.power.PowerSensor object at 0x3359e90>
2014-03-10 15:44:20,837 DEBUG __init__.instantiate(): Context for root instantiated [BatterySensor] <ajenti.plugins.power.power.BatterySensor object at 0x369a350>
2014-03-10 15:44:20,837 DEBUG compat.Popen(): Popen: ['which', 'pm-suspend']
2014-03-10 15:44:20,842 DEBUG compat.Popen(): Popen: ['which', 'pm-hibernate']
2014-03-10 15:44:20,853 DEBUG __init__.instantiate(): Context for root instantiated [CPUSensor] <ajenti.plugins.sensors.cpu.CPUSensor object at 0x369a590>
2014-03-10 15:44:28,696 DEBUG compat.Popen(): Popen: ['mysql', u'-uroot', u'-ptechno', '-h', u'localhost']
2014-03-10 15:44:28,702 DEBUG api.query(): SHOW DATABASES;
2014-03-10 15:44:30,686 DEBUG compat.Popen(): Popen: ['chgrp', 'ftp', u'/srv/test.at']
2014-03-10 15:44:30,692 DEBUG compat.Popen(): Popen: ['chmod', 'g+w', u'/srv/test.at']
2014-03-10 15:44:30,698 DEBUG compat.Popen(): Popen: ['db_load', '-T', '-t', 'hash', '-f', '/tmp/tmpIyUZU4', '/etc/vsftpd/users.db']
But would this be the correct location for the mod? Because the open_basedir addition should be only availabe in the php-fpm block?
i have tested a little bit more and the location nginx_templates.py:202
will result in the correct final position, my last problem is which code would i need in nginx.py:38
to assign the current website dir to 'root' => 'root': website.root, raises an error and location.path is empty
Try ws.root
Thank you for the Info.
Now it works, maybe this will be a good feature for ajenti because it improves the security from ajenti v websites (http://www.php.net/manual/en/ini.core.php#ini.open-basedir)
Modifications:
nginx_templates.py:205 fastcgi_param PHP_VALUE "open_basedir=%(root)s/:/usr/share/php:/usr/share/pear:/tmp";
nginx.py:38 'root': ws.root,
Could you please try using fastcgi_param PHP_VALUE "open_basedir=$document_root/:/usr/share/php:/usr/share/pear:/tmp";
instead? This won't require code modifications since variable substitution will be done by NGINX. This can even be included in /etc/nginx.custom.d
But again, this isn't compatible with every website since, for example, someone might want to open their files from /mnt/...
$document_root won't be resolved to the full path
of course you are right but maybe it would be much better to add an additional field to override / add custom paths per website because at the moment a php script could include theoretically every file which is accessible by www-data which is not the best solution i think
$document_root
should be resolved to exactly the path in previous root
directive (which is website root) according to the docs
Sorry my mistake i have only checked it in the config file and not directly over php
The solution with $document_root works
Maybe it would be easier to create for every website different php-fpm config files with the option for custom input per site and globally because then the config will be in the "right place" On the other site with this function the availibility of some variables like doc root is important
And the feature request #30 & #33 will be even easier to implement i think?
Additionally this should increase the performance with many sites because ajenti has to recreate only the config for one site
open_basedir
was added to PHP content settings a few releases ago.
i have tried to add "fastcgi_param PHP_VALUE "open_basedir=%(root)s"; " at line 204 in /var/lib/ajenti/plugins/vh-nginx/nginx_templates.py to get open_basedir by default for every website
But i get the following error after restarting ajenti v and try to save changes on a website: