# These modules are required for the basic configuration directives used in this file. # They *must* be loaded to use this configuration with httpd. LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so LoadModule allowmethods_module /usr/lib/apache2/modules/mod_allowmethods.so LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so LoadModule env_module /usr/lib/apache2/modules/mod_env.so #LoadModule log_config_module /usr/lib/apache2/mod_log_config.so LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so LoadModule mime_magic_module /usr/lib/apache2/modules/mod_mime_magic.so LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so #LoadModule unixd_module /usr/lib/apache2/mod_unixd.so # Load extra modules. IncludeOptional /etc/apache2/mods-enabled/*.load # IP addresses and ports to listen on. Listen 5.101.171.215:80 Listen [2a01:a500:2981:1::d7]:80 Listen 5.101.171.215:25443 Listen [2a01:a500:2981:1::d7]:25443 # Main server configuration. # Note: A DocumentRoot (and a Directory block granting access) is required in order for RedirectMatch to work in VirtualHosts. DocumentRoot /var/www/html ServerAdmin "sysadmin(at)slackware.uk" ServerName core.slackware.uk.net ServerSignature Email ServerTokens Major User www-data Group www-data DefaultRuntimeDir /var/run/apache2 PidFile /var/run/apache2/apache2.pid ScriptSock /var/run/apache2/cgid.sock Mutex pthread # Logging. LogFormat "%h %l %u %t \"%r\" %>s %b" Common LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" Combined LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" VHostCombined CustomLog "|/usr/bin/logger -p local1.info -t httpd" VHostCombined env=!no_log LogLevel warn allowmethods:crit authz_core:crit LogLevel include:crit LogLevel ssl:crit ErrorLog syslog:local0 # Resource limits for event MPM. # MaxConnectionsPerChild: maximum number of requests a server process serves # MaxRequestWorkers: maximum number of worker threads # MaxSpareThreads: maximum number of worker threads which are kept spare # MinSpareThreads: minimum number of worker threads which are kept spare # StartServers: initial number of server processes to start # ThreadLimit: maximum limit of threads for ThreadsPerChild setting # ThreadsPerChild: constant number of worker threads in each server process MaxConnectionsPerChild 10240 MaxRequestWorkers 128 MaxSpareThreads 16 MinSpareThreads 2 StartServers 1 ThreadLimit 64 ThreadsPerChild 32 # Timeouts. TimeOut 30 GracefulShutDownTimeout 1 # Browser handling. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MS FrontPage" redirect-carefully BrowserMatch "MSIE [2-5]" nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "^WebDAVFS/1\.[012]" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^XML Spy" redirect-carefully BrowserMatch "^gnome-vfs/1\.0" redirect-carefully BrowserMatch "^gvfs/1" redirect-carefully BrowserMatch "Konqueror/4" redirect-carefully # HTTP2. Protocols h2 h2c http/1.1 H2Push On H2PushPriority application/javascript interleaved H2PushPriority image/jpeg after 32 H2PushPriority image/png after 32 H2PushPriority text/css before H2PushPriority * after # SSL configuration. SSLCipherSuite HIGH:!SSLv3:!TLS1:!aNULL:!MD5 SSLHonorCipherOrder On SSLOptions +FakeBasicAuth SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 SSLRandomSeed startup builtin SSLRandomSeed startup file:/dev/urandom 512 SSLRandomSeed connect builtin SSLRandomSeed connect file:/dev/urandom 512 SSLSessionCache shmcb:${APACHE_RUN_DIR}/ssl_session_cache(512000) SSLSessionCacheTimeout 300 SSLSessionTickets Off BrowserMatch "MSIE [2-5]" ssl-unclean-shutdown # PHP. DirectoryIndex index.php index.phtml SetHandler proxy:unix:/run/php-fpm83/php-fpm.sock|fcgi://localhost/ # Filters and Handlers. AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/wasm AddOutputFilterByType DEFLATE application/xml AddOutputFilter INCLUDES .shtml .html #This isn't needed except where CGI scripts are placed outside of ScriptAlias dirs. ExecCGI is required in Options for the dir. # # AddHandler cgi-script .cgi .pl .py .sh # # Mime type mappings. TypesConfig /etc/mime.types AddEncoding x-compress .tz .z .Z AddEncoding x-gzip .gz .tgz AddEncoding x-bzip2 .bz2 .tbz AddType application/octet-stream .deb .dpkg .flac .flp .img .lz .lzma .mkv .rpm .run .srpm .tlz .txz .vob .xz AddType application/pkcs8 .key AddType application/pkcs10 .csr AddType application/pkix-crl .crl AddType application/x-pem-file .pem AddType application/x-x509-user-cert .crt AddType text/html .shtml AddType text/markdown .md AddType text/plain .csh .diff .ksh .md5 .md5sum .meta .patch .pl .pm .py .rb .sh .sha .shasum .sha1 .sha1sum .sha256 .sha256sum .sha512 .sha512sum .slackbuild .tcl .url MIMEMagicFile /etc/apache2/magic # Lets Encrypt validation. Alias /.well-known/acme-challenge/ /srv/dehydrated/ # Access control. Require all denied Options SymLinksIfOwnerMatch AllowOverride None Require all denied Options None AllowOverride None Require all granted Options None AllowOverride None Require all granted Options Includes MultiViews SymLinksIfOwnerMatch AllowOverride AuthConfig FileInfo Indexes Limit Require all granted AllowMethods GET POST OPTIONS DirectoryIndex index.html index.xhtml DirectoryIndex index.shtml SSLOptions +StdEnvVars Options ExecCGI Includes MultiViews SymLinksIfOwnerMatch AllowOverride AuthConfig FileInfo Limit Require all granted AllowMethods GET POST OPTIONS DirectoryIndex disabled SSLOptions +StdEnvVars # Include extra configurations. IncludeOptional /etc/apache2/sites-enabled/*.conf