Advertisement
Guest User

Untitled

a guest
Dec 9th, 2021
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.75 KB | None | 0 0
  1. # This is the main Apache server configuration file. It contains the
  2. # configuration directives that give the server its instructions.
  3. # See http://httpd.apache.org/docs/2.4/ for detailed information about
  4. # the directives and /usr/share/doc/apache2/README.Debian about Debian specific
  5. # hints.
  6. #
  7. #
  8. # Summary of how the Apache 2 configuration works in Debian:
  9. # The Apache 2 web server configuration in Debian is quite different to
  10. # upstream's suggested way to configure the web server. This is because Debian's
  11. # default Apache2 installation attempts to make adding and removing modules,
  12. # virtual hosts, and extra configuration directives as flexible as possible, in
  13. # order to make automating the changes and administering the server as easy as
  14. # possible.
  15.  
  16. # It is split into several files forming the configuration hierarchy outlined
  17. # below, all located in the /etc/apache2/ directory:
  18. #
  19. # /etc/apache2/
  20. # |-- apache2.conf
  21. # | `-- ports.conf
  22. # |-- mods-enabled
  23. # | |-- *.load
  24. # | `-- *.conf
  25. # |-- conf-enabled
  26. # | `-- *.conf
  27. # `-- sites-enabled
  28. # `-- *.conf
  29. #
  30. #
  31. # * apache2.conf is the main configuration file (this file). It puts the pieces
  32. # together by including all remaining configuration files when starting up the
  33. # web server.
  34. #
  35. # * ports.conf is always included from the main configuration file. It is
  36. # supposed to determine listening ports for incoming connections which can be
  37. # customized anytime.
  38. #
  39. # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
  40. # directories contain particular configuration snippets which manage modules,
  41. # global configuration fragments, or virtual host configurations,
  42. # respectively.
  43. #
  44. # They are activated by symlinking available configuration files from their
  45. # respective *-available/ counterparts. These should be managed by using our
  46. # helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
  47. # their respective man pages for detailed information.
  48. #
  49. # * The binary is called apache2. Due to the use of environment variables, in
  50. # the default configuration, apache2 needs to be started/stopped with
  51. # /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
  52. # work with the default configuration.
  53.  
  54.  
  55. # Global configuration
  56. #
  57.  
  58. #
  59. # ServerRoot: The top of the directory tree under which the server's
  60. # configuration, error, and log files are kept.
  61. #
  62. # NOTE! If you intend to place this on an NFS (or otherwise network)
  63. # mounted filesystem then please read the Mutex documentation (available
  64. # at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
  65. # you will save yourself a lot of trouble.
  66. #
  67. # Do NOT add a slash at the end of the directory path.
  68. #
  69. #ServerRoot "/etc/apache2"
  70.  
  71. #
  72. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  73. #
  74. #Mutex file:${APACHE_LOCK_DIR} default
  75.  
  76. #
  77. # The directory where shm and other runtime files will be stored.
  78. #
  79.  
  80. DefaultRuntimeDir ${APACHE_RUN_DIR}
  81.  
  82. #
  83. # PidFile: The file in which the server should record its process
  84. # identification number when it starts.
  85. # This needs to be set in /etc/apache2/envvars
  86. #
  87. PidFile ${APACHE_PID_FILE}
  88.  
  89. #
  90. # Timeout: The number of seconds before receives and sends time out.
  91. #
  92. Timeout 1800
  93.  
  94. #
  95. # Proxy time out
  96. #
  97. ProxyTimeout 1800
  98.  
  99. #
  100. # KeepAlive: Whether or not to allow persistent connections (more than
  101. # one request per connection). Set to "Off" to deactivate.
  102. #
  103. KeepAlive On
  104.  
  105. #
  106. # MaxKeepAliveRequests: The maximum number of requests to allow
  107. # during a persistent connection. Set to 0 to allow an unlimited amount.
  108. # We recommend you leave this number high, for maximum performance.
  109. #
  110. MaxKeepAliveRequests 0
  111.  
  112. #
  113. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  114. # same client on the same connection.
  115. #
  116. KeepAliveTimeout 5
  117.  
  118.  
  119. # These need to be set in /etc/apache2/envvars
  120. User ${APACHE_RUN_USER}
  121. Group ${APACHE_RUN_GROUP}
  122.  
  123. #
  124. # HostnameLookups: Log the names of clients or just their IP addresses
  125. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  126. # The default is off because it'd be overall better for the net if people
  127. # had to knowingly turn this feature on, since enabling it means that
  128. # each client request will result in AT LEAST one lookup request to the
  129. # nameserver.
  130. #
  131. HostnameLookups Off
  132.  
  133. # ErrorLog: The location of the error log file.
  134. # If you do not specify an ErrorLog directive within a <VirtualHost>
  135. # container, error messages relating to that virtual host will be
  136. # logged here. If you *do* define an error logfile for a <VirtualHost>
  137. # container, that host's errors will be logged there and not here.
  138. #
  139. ErrorLog ${APACHE_LOG_DIR}/APACHE.error.log
  140.  
  141. #
  142. # LogLevel: Control the severity of messages logged to the error_log.
  143. # Available values: trace8, ..., trace1, debug, info, notice, warn,
  144. # error, crit, alert, emerg.
  145. # It is also possible to configure the log level for particular modules, e.g.
  146. # "LogLevel info ssl:warn"
  147. #
  148. LogLevel warn
  149.  
  150. # Include module configuration:
  151. IncludeOptional mods-enabled/*.load
  152. IncludeOptional mods-enabled/*.conf
  153.  
  154. # Include list of ports to listen on
  155. Include ports.conf
  156.  
  157.  
  158. # Sets the default security model of the Apache2 HTTPD server. It does
  159. # not allow access to the root filesystem outside of /usr/share and /var/www.
  160. # The former is used by web applications packaged in Debian,
  161. # the latter may be used for local directories served by the web server. If
  162. # your system is serving content from a sub-directory in /srv you must allow
  163. # access here, or in any related virtual host.
  164. <Directory />
  165. Options FollowSymLinks
  166. AllowOverride None
  167. Require all denied
  168. </Directory>
  169.  
  170. <Directory /usr/share>
  171. AllowOverride None
  172. Require all granted
  173. </Directory>
  174.  
  175. <Directory /var/www/>
  176. Require all granted
  177. AllowOverride All
  178. Options FollowSymLinks MultiViews
  179.  
  180. <IfModule mod_dav.c>
  181. Dav off
  182. </IfModule>
  183. </Directory>
  184.  
  185. #<Directory /srv/>
  186. # Options Indexes FollowSymLinks
  187. # AllowOverride None
  188. # Require all granted
  189. #</Directory>
  190.  
  191.  
  192.  
  193.  
  194. # AccessFileName: The name of the file to look for in each directory
  195. # for additional configuration directives. See also the AllowOverride
  196. # directive.
  197. #
  198. AccessFileName .htaccess
  199.  
  200. #
  201. # The following lines prevent .htaccess and .htpasswd files from being
  202. # viewed by Web clients.
  203. #
  204. <FilesMatch "^\.ht">
  205. Require all denied
  206. </FilesMatch>
  207.  
  208.  
  209. #
  210. # The following directives define some format nicknames for use with
  211. # a CustomLog directive.
  212. #
  213. # These deviate from the Common Log Format definitions in that they use %O
  214. # (the actual bytes sent including headers) instead of %b (the size of the
  215. # requested file), because the latter makes it impossible to detect partial
  216. # requests.
  217. #
  218. # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
  219. # Use mod_remoteip instead.
  220. #
  221. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  222. LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
  223. LogFormat "%h %l %u %t \"%r\" %>s %O" common
  224. LogFormat "%{Referer}i -> %U" referer
  225. LogFormat "%{User-agent}i" agent
  226.  
  227. # Include of directories ignores editors' and dpkg's backup files,
  228. # see README.Debian for details.
  229.  
  230. # Include generic snippets of statements
  231. IncludeOptional conf-enabled/*.conf
  232.  
  233. # Include the virtual host configurations:
  234. IncludeOptional sites-enabled/*.conf
  235.  
  236. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  237. LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
  238. LoadModule proxy_fcgi_module /usr/lib/apache2/modules/mod_proxy_fcgi.so
  239.  
  240. AddHandler fcgid-script .fcgi .php .fpl
  241. FcgidConnectTimeout 20
  242. FcgidMaxRequestLen 268435456
  243. FcgidMaxProcessesPerClass 10
  244. FcgidIOTimeout 300
  245. [/code]
  246.  
  247. Tulemus oli ikka sama, et aeg ajalt puudus kõikidele veebilehtedele mõneks ajaks juurde pääs.
  248. Täna hommuku käisin läbi selle juhendid ja tegin vastavad muudatused esialgu ainult ühe domeeniga https://www.linode.com/docs/guides/how-to-install-and-configure-fastcgi-and-php-fpm-on-ubuntu-18-04/
  249.  
  250. Eelnevalt ennem muudatuste tegemist kustutasin apache error logi tühjaks. Pärast muudatusi näen logis ainult neid mõnda rida
  251. [code][Thu Dec 09 09:38:29.304718 2021] [mpm_prefork:notice] [pid 89157] AH00171: Graceful restart requested, doing restart
  252. [Thu Dec 09 09:38:30.208587 2021] [so:warn] [pid 89157] AH01574: module proxy_module is already loaded, skipping
  253. [Thu Dec 09 09:38:30.208636 2021] [so:warn] [pid 89157] AH01574: module proxy_fcgi_module is already loaded, skipping
  254. [Thu Dec 09 09:38:30.218031 2021] [mpm_prefork:notice] [pid 89157] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f configured -- resuming normal operations
  255. [Thu Dec 09 09:38:30.218065 2021] [core:notice] [pid 89157] AH00094: Command line: '/usr/sbin/apache2'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement