; ; Example configuration for serving Roundcube installed in ; ${DOCUMENT_ROOT}/roundcube/ through an uwsgi vassal (for more information see ; https://github.com/unbit/uwsgi-docs/blob/master/Emperor.rst) ; [uwsgi] ; user as which the vassal runs owner = %p ; log dir must be writable by the user as which the vassal runs logdir = /home/%(owner)/logs ; directory where the socket is created, must be writable by the user as which ; the vassal runs and accessible by the proxy in fornt of uwsgi sockdir = /home/%(owner)/uwsgi ; custom variables basedir = /home/%(owner)/public_html ; plugins to load plugins = 0:notfound,php,router_http,router_redirect,router_rewrite,router_static,router_uwsgi,logfile ; enable master process master = true ; maximum number of worker processes to spawn processes = 4 ; number of seconds after which uWSGI enters cheap mode idle = 30 ; number of requests after which a worker is restarted max-requests = 1000 ; memory limit for restarting a worker process after completing the current ; request reload-on-rss = 128M ; memory limit for instantly reloading a worker process evil-reload-on-rss = 192M ; default logfile logger = file:%(logdir)/error.log ; request logfile req-logger = file:%(logdir)/access.log ; prefix log entries with timestamp log-date = true ; maximum log size before log is rotated log-maxsize = 10485760 ; format of request logging log-format = %(host) %(addr) - %(user) [%(ltime)] "%(method) %(uri) %(proto)" %(status) %(size) "%(referer)" "%(uagent)" ; log configuration show-config = true ; socket uwsgi-socket = %(sockdir)/uwsgi.sock ; socket permissions chmod-socket = 660 ; remove sockets when terminating vacuum = true ; automatically set process title to something meaningful auto-procname = true ; log requests handled by the notfound plugin notfound-log = true ; ; static file settings ; ; redirect if requested directory misses a trailing slash route-uri = /$ goto:deny-ht-files route-if = isdir:${DOCUMENT_ROOT}/${REQUEST_URI} redirect-permanent:${REQUEST_URI}/ ; deny access to .ht* files route-label = deny-ht-files route = /\.ht break:404 Not Found ; ; PHP settings ; ; php.ini to load php-ini = /etc/php.ini for-glob = /etc/php.d/*.ini php-ini-append = %(_) endfor = ; additional PHP configuration values php-set = date.timezone=Europe/Berlin for = .php .php5 .inc ; do not serve PHP files as static files static-skip-ext = %(_) ; PHP script to invoke as index static-index = index%(_) php-index = index%(_) ; enable PHP for known filename extensions php-allowed-ext = %(_) ; and route everything to the PHP plugin route = \%(_)$ uwsgi:,14,0 endfor = ; Roundcube-specific routing (based on .htaccess route = ^/favicon\.ico$ static:${DOCUMENT_ROOT}/roundcube/skins/larry/images/favicon.ico route = \.git/ break:403 Forbidden route = ^/roundcube/?(README(.md)?|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ break:403 Forbidden route = ^/roundcube/?(SQL|bin) break:403 Forbidden route = .* last: