These are the config files, in case they might be of help. With the exception of nextcloud.conf
, I think the other ones are the default ones.
/etc/apache2/sites-available/nextcloud.conf
Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
/etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerAdmin example@example
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>
/etc/apache2/sites-available/default-ssl.conf
This file is very big and I only modified these two lines to change the cert
...
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
...
/etc/apache2/ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
/etc/apache2/apache2.conf
I suppressed the comments in this file otherwise it gets very big
# This is the main Apache server configuration file...
# ...
# The directory where shm and other runtime files will be stored.
DefaultRuntimeDir ${APACHE_RUN_DIR}
# PidFile: The file in which the server should record...
PidFile ${APACHE_PID_FILE}
# Timeout: The number of seconds...
Timeout 300
# KeepAlive: Whether or not to allow persistent connections...
KeepAlive On
# MaxKeepAliveRequests: The maximum number of requests to allow...
MaxKeepAliveRequests 100
# KeepAliveTimeout: Number of seconds to wait for the next request...
KeepAliveTimeout 5
# 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...
HostnameLookups Off
# ErrorLog: The location of the error log file
ErrorLog ${APACHE_LOG_DIR}/error.log
# LogLevel: Control the severity of messages...
LogLevel warn
# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
# Include list of ports to listen on
Include ports.conf
# Sets the default security model of the Apache2 HTTPD server...
<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...
AccessFileName .htaccess
# The following lines prevent .htaccess and .htpasswd files...
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
# The following directives define some format nicknames...
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
# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet