-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
350 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
### Overrides the generic apache configuration file | ||
|
||
# The directory where shm and other runtime files will be stored. This needs to be set in /etc/apache2/envvars | ||
DefaultRuntimeDir ${APACHE_RUN_DIR} | ||
|
||
# PidFile: The file in which the server should record its process identification number when it starts. This needs to be set in /etc/apache2/envvars | ||
PidFile ${APACHE_PID_FILE} | ||
|
||
# Timeout: The number of seconds before receives and sends time out. | ||
Timeout 300 | ||
|
||
# KeepAlive: Whether or not to allow persistent connections (more than one request per connection). Set to "Off" to deactivate. | ||
KeepAlive On | ||
|
||
# MaxKeepAliveRequests: The maximum number of requests to allow during a persistent connection. Set to 0 to allow an unlimited amount. | ||
# We recommend you leave this number high, for maximum performance. | ||
MaxKeepAliveRequests 100 | ||
|
||
# KeepAliveTimeout: Number of seconds to wait for the next request from the same client on the same connection. 10, a bit higher, for Parsifal situations | ||
KeepAliveTimeout 10 | ||
|
||
# User name and group. These need to be set in /etc/apache2/envvars | ||
User ${APACHE_RUN_USER} | ||
Group ${APACHE_RUN_GROUP} | ||
|
||
# HostnameLookups: Log the names of clients or just their IP addresses. Off to save on DNS requests | ||
HostnameLookups Off | ||
|
||
# ErrorLog: The location of the error log file. | ||
ErrorLog ${APACHE_LOG_DIR}/general-error.log | ||
|
||
# LogLevel: Control the severity of messages logged to the error_log. Available values: trace8, ..., trace1, debug, info, notice, warn, error, crit, alert, emerg. | ||
LogLevel warn | ||
|
||
# Include module configuration: | ||
IncludeOptional mods-enabled/*.load | ||
IncludeOptional mods-enabled/*.conf | ||
|
||
# Include list of ports to listen on | ||
Include ports.conf | ||
|
||
<Directory /> | ||
Options FollowSymLinks | ||
AllowOverride None | ||
Require all denied | ||
</Directory> | ||
|
||
<Directory /usr/share> | ||
AllowOverride None | ||
Require all granted | ||
</Directory> | ||
|
||
<Directory /var/www/> | ||
Options Indexes FollowSymLinks | ||
AllowOverride None | ||
Require all granted | ||
</Directory> | ||
|
||
|
||
# AccessFileName: The name of the file to look for in each directoryfor additional configuration directives. | ||
AccessFileName .htaccess | ||
|
||
# Prevent .htaccess and .htpasswd files from being viewed by Web clients. | ||
<FilesMatch "^\.ht"> | ||
Require all denied | ||
</FilesMatch> | ||
|
||
# Define log formats | ||
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined | ||
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined | ||
LogFormat "%h %l %u %t \"%r\" %>s %O" common | ||
LogFormat "%{Referer}i -> %U" referer | ||
LogFormat "%{User-agent}i" agent | ||
|
||
# Info on server returned in the header. one of: Full | OS | Minimal | Minor | Major | Prod | ||
# 'Full' sends info about OS-Type and compiled in modules. Prod sends the least for production scenarios | ||
ServerTokens Prod | ||
|
||
# Send minimal identification information on error pages | ||
ServerSignature Off | ||
|
||
# Disallow TRACE methoid | ||
TraceEnable Off | ||
|
||
# Forbid access to version control directories | ||
RedirectMatch 404 /\.git | ||
RedirectMatch 404 /\.svn | ||
|
||
# Prevent other sites from embedding pages from this site as frames. This defends against clickjacking attacks. | ||
Header set Content-Security-Policy "frame-ancestors 'self';" | ||
|
||
# Include enabled configurations | ||
IncludeOptional conf-enabled/*.conf | ||
|
||
# Include enabled hosts | ||
IncludeOptional sites-enabled/*.conf |
45 changes: 45 additions & 0 deletions
45
images/dante-wiki/src/etc/apache2/conf-available/cache.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
|
||
# run all other modules, such as access permission and authentication and do not satify request immediately from cache. | ||
CacheQuickHandler off | ||
|
||
# Lock the cache to prevent race conditions | ||
CacheLock on | ||
CacheLockPath /tmp/mod_cache-lock | ||
CacheRoot /var/cache/apache2/mod_cache_disk | ||
|
||
# Set parameters for disk cache | ||
CacheDirLevels 2 | ||
CacheDirLength 1 | ||
|
||
# Set cache control for specific types of files | ||
CacheEnable disk | ||
CacheHeader on | ||
CacheDefaultExpire 3600 | ||
CacheMaxExpire 86400 | ||
CacheLastModifiedFactor 0.5 | ||
|
||
# Rather not set this as it might affect page personalization (according to ChatGPT 4) | ||
# CacheIgnoreHeaders Set-Cookie | ||
|
||
<Location "/"> | ||
# Enable expirations | ||
ExpiresActive On | ||
|
||
# Default directive | ||
ExpiresDefault "access plus 1 day" | ||
|
||
# html files expire immediately since they change frequently | ||
ExpiresByType text/html "now" | ||
|
||
# Other file types do not expire since they do not change or come with hash coding inside | ||
ExpiresByType image/gif "access plus 1 day" | ||
ExpiresByType image/jpeg "access plus 1 day" | ||
ExpiresByType image/png "access plus 1 day" | ||
ExpiresByType text/css "access plus 1 day" | ||
ExpiresByType text/javascript "access plus 1 day" | ||
ExpiresByType application/javascript "access plus 1 day" | ||
ExpiresByType application/pdf "access plus 1 day" | ||
ExpiresByType image/x-icon "access plus 1 day" | ||
|
||
</Location> |
23 changes: 23 additions & 0 deletions
23
images/dante-wiki/src/etc/apache2/conf-available/ldap-restrictions.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# configuration which binds to an ldap server | ||
# and requires a valid user for accessing the wiki | ||
# | ||
# | ||
# | ||
|
||
|
||
# NOTE 1: AuthnProviderAlias must not be part of an <If>, however below environment variables | ||
# only are guaranteed to have meaningful values when USING_LDAP is true. Thus we have the If | ||
# inside of AuthnProviderAlias | ||
|
||
<AuthnProviderAlias ldap ldap_provider_alias> | ||
AuthLDAPURL ${AuthLDAPURL} | ||
AuthLDAPBindDN "$AuthLDAPBindDN}" | ||
AuthLDAPBindPassword "${AuthLDAPBindPassword}" | ||
</AuthnProviderAlias> | ||
|
||
<Location /wiki-dir > | ||
AuthType Basic | ||
AuthBasicProvider ldap_provider_alias | ||
AuthName "${LDAP_AUTHNAME}" | ||
Require valid-user | ||
</Location> |
9 changes: 9 additions & 0 deletions
9
images/dante-wiki/src/etc/apache2/conf-available/no-cache.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## | ||
|
||
ExpiresActive Off | ||
Header always unset Cache-Control | ||
Header always unset Expires | ||
Header always unset Pragma | ||
Header always unset Last-Modified | ||
Header always unset ETag | ||
Header always set X-Dante-Cache "no-cache" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
images/dante-wiki/src/etc/apache2/conf-enabled/additional-ip.conf
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
images/dante-wiki/src/etc/apache2/conf-enabled/additional-ldap.conf
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.