Advertisement
Guest User

Untitled

a guest
Apr 4th, 2022
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.80 KB | None | 0 0
  1. [uwsgi]
  2. # (optional) makes Nextcloud process(es) spawned by uWSGI more recognizable as uWSGI sub-processes
  3. # procname-master = %n
  4. procname-master = uwsgi %n
  5.  
  6. master = true
  7.  
  8. plugins = php
  9.  
  10. # hack to work around a uWSGI bug that renders opcache dysfunctional (see uWSGI docs)
  11. php-sapi-name = apache
  12.  
  13. # make location of uWSGI socket compatible with systemd unit files for uWSGI
  14. # socket = /run/%n/%n.sock
  15. # (see /usr/lib/systemd/system/uwsgi@.socket)
  16. socket = /run/uwsgi/%n.sock
  17.  
  18. # uncomment for a stats socket, that can be used with uwsgitop
  19. # stats = /run/%n/%n-stats.sock
  20. # relocate statistics socket accordingly
  21. # stats = /run/uwsgi/%n-stats.sock
  22.  
  23. # cleanup sockets when uWSGI terminates
  24. vacuum = true
  25.  
  26. uid = nextcloud
  27. gid = nextcloud
  28.  
  29. # make sockets read-/writeable only by user nextcloud and web server
  30. chown-socket = %(uid):http
  31. chmod-socket = 660
  32.  
  33. # files created by Nextcloud code only writeable by user nextcloud
  34. umask = 022
  35.  
  36. # number of workers is adapted dynamically. no need to run more than one worker when idle
  37. cheaper = 1
  38. processes = 10
  39. # cheaper = 4
  40. cheaper-step = 1
  41. idle = 600
  42. die-on-idle = true
  43.  
  44. # reload whenever this config file changes
  45. touch-reload = %p
  46.  
  47. # request logging is usually already done by the web server
  48. disable-logging = true
  49.  
  50. # custom parameters are difficult to distinguish from real config parameters
  51. # and not really needed anyway
  52. # cloud_data_dir = /var/lib/nextcloud/data
  53. # cloud_writable_apps_dir = /var/lib/nextcloud/apps
  54. chdir = /var/lib/nextcloud/data
  55.  
  56. php-allowed-ext = .php
  57. php-docroot = /usr/share/webapps/%n
  58. php-index = index.php
  59.  
  60. # adapt time zone to your needs
  61. php-set = date.timezone=America/New_York
  62.  
  63. # remove %(cloud_data_dir):%(cloud_writeable_apps_dir) as already covered by
  64. # /var/lib/%n. remove redis socket in case redis is not used.
  65. # /var/log/%n/%n.log is not a directory. replace by /var/log/%n
  66. # php-set = open_basedir=/var/lib/nextcloud/data:/var/lib/nextcloud/apps:/tmp:/usr/share/webapps/nextcloud:/etc/webapps/nextcloud:/dev/urandom:/usr/lib/php/modules:/var/log/nextcloud:/proc/meminfo
  67.  
  68. # put session data in dedicated directory
  69. php-set = session.save_path=/tmp
  70. php-set = session.save_path=/var/lib/%n/sessions
  71. php-set = session.gc_maxlifetime=21600
  72. php-set = session.gc_divisor=500
  73. php-set = session.gc_probability=1
  74.  
  75. php-set = expose_php=false
  76. php-set = post_max_size=5G
  77. php-set = upload_max_filesize=10G
  78.  
  79. # as recommended in admin manual (avoids related warning in admin GUI later)
  80. php-set = output_buffering=off
  81. php-set = max_input_time=240
  82. php-set = max_execution_time=240
  83.  
  84. php-set = memory_limit=6144M
  85.  
  86. php-set = zend_extension=opcache
  87. php-set = opcache.enable=1
  88. # remove (see https://github.com/nextcloud/server/pull/15468)
  89. # php-set = opcache.enable_cli=1
  90. php-set = opcache.interned_strings_buffer=16
  91. php-set = opcache.max_accelerated_files=10000
  92. php-set = opcache.memory_consumption=512
  93. php-set = opcache.save_comments=1
  94. php-set = opcache.revalidate_freq=1
  95.  
  96. # uncomment if php-apcu is installed and used
  97. php-set = extension=apcu
  98. # (see https://github.com/krakjoe/apcu/blob/simplify/INSTALL)
  99. php-set = apc.ttl=7200
  100. php-set = apc.enable_cli=1
  101.  
  102. php-set = extension=bcmath
  103. php-set = extension=bz2
  104. # already enabled in standard php.ini. no need to enable it here again
  105. php-set = extension=curl
  106. php-set = extension=exif
  107. # extension ftp is very likely not used
  108. php-set = extension=ftp
  109. php-set = extension=gd
  110. php-set = extension=gmp
  111. # uncomment if php-imagick is installed and used
  112. php-set = extension=imagick
  113. # uncomment if php-imap is installed and used
  114. php-set = extension=imap
  115. # recommended to enable
  116. php-set = extension=intl
  117. php-set = extension=iconv
  118. # extension ldap is very likely not used
  119. php-set = extension=ldap
  120. # uncomment if php-memcached is installed and used
  121. php-set = extension=memcached
  122. # uncomment exactly one of the pdo extensions
  123. # php-set = extension=pdo_mysql
  124. php-set = extension=pdo_pgsql
  125. # php-set = extension=pdo_sqlite
  126. # uncomment if php-igbinary is installed and used
  127. # php-set = extension=igbinary
  128. # uncomment if php-redis is installed and used (requires php-igbinary)
  129. # php-set = extension=redis
  130. # no docs anywhere that recommend this extension
  131. # php-set = extension=sockets
  132. # uncomment if php-xsl is installed and used
  133. # php-set = extension=xsl
  134. # already enabled in standard php.ini. no need to enable it here again
  135. php-set = extension=zip
  136.  
  137. # web server is already handling URL rewriting, so tell Nextcloud not to repeat this
  138. env = front_controller_active=true
  139.  
  140. # we will do that with systemd timers
  141. # change the URL to your own address and uncomment to run a webcron job every five minutes
  142. # cron = -5 -1 -1 -1 -1 curl --silent https://change.me.tld/cron.php 1>/dev/null
  143. # uncomment to run a cron job every five minutes
  144. # cron = -5 -1 -1 -1 -1 php -f /usr/share/webapps/%n/cron.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement