Search
Items tagged with: ErrorLog
Solved as follows:
The SSL let's encrypt cert is created out of the http file of the given domain or subdomain:/etc/apache2/sites-available/domain.org.conf
standard domain.org.conf
<VirtualHost *:80>
ServerAdmin admin@domain.org
ServerName domain.org
DocumentRoot /var/www/domainorg
# AllowOverride is specifically added for the friendica server
<Directory /var/www/domainorg>
AllowOverride All
</Directory>
# AllowOverride is specifically added for the friendica server
ErrorLog ${APACHE_LOG_DIR}/domainorg_error.log
CustomLog ${APACHE_LOG_DIR}/domainorg_access.log combined
</VirtualHost>
The SSL domain reference file created from the http filename get's added by default -le-ssl
to the existing domain.org.conf name. The port for SSL connections is 443 while the standard http connection is over port 80.
domain.org-le-ssl.conf
This is the content of the file created for a multi domain VPS server. This contenet matches the content that was in the original 000-default-le-ssl.conf file of the single domain VPS setup, created by the certbot routine. The SSL certificate is supposed to be updated automatically every year. For now it is not clear if the changes made will be affected negatively by that automatic SSL cert update.<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin admin@domain.org
ServerName domain.org
DocumentRoot /var/www/domainorg
# AllowOverride is specifically added for the friendica server
<Directory /var/www/domainorg>
AllowOverride All
</Directory>
# AllowOverride is specifically added for the friendica server
ErrorLog ${APACHE_LOG_DIR}/domainorg_error.log
CustomLog ${APACHE_LOG_DIR}/domainorg_access.log combined
ServerName domain.org
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/domain.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.org/privkey.pem
</VirtualHost>
</IfModule>
activating and deactivating .conf fles
To make the changes come into effect the new conf file has to be activated, the old one that shouldn't apply anymore should be deactivated and the apache server itself has to be reloaded or to be restarted:rootname@VPShosting:~# a2ensite domain.org
rootname@VPShosting:~# a2ensite domain.org-le-ssl.conf
rootname@VPShosting:~# a2dissite 000-default.conf
rootname@VPShosting:~# a2dissite 000-default-le-ssl.conf
rootname@VPShosting:~# systemctl restart apache2
Reloading the site took a while longer than nomal, indicating that new background tasks where happening.
testing the new folder structure
and if site configuration was actually in place.Renaming the index file of the old /html folder.
Reloading the site did still work so the old /html folder structure wasn't active anymore.
Renaming the entire old /html folder structure taking it out of access completely.
Creating a new /html folder.
Creating a new html. index file in /var/www/html.
rootname@VPShosting:~# mv /var/www/html/index.php /var/www/html/index_old.php
rootname@VPShosting:~# mv /var/www/html/ /var/www/html_old/
rootname@VPShosting:~# mkdir /var/www/html/
rootname@VPShosting:~# nano /var/www/html/index.html
<html>
<title>name-based virtual hosting setup</title>
<h1>Welcome to the /html/ index.html fall back file.</h1>
<p>This is a test file for a name-based virtual hosting setup</p>
</html>
Next steps:
Installing a SSL cert for subdomain.org.
Installing a subdomain test site.
Installing a new friendica domain.com site from scratch.
Lo, thar be cookies on this site to keep track of your login. By clicking 'okay', you are CONSENTING to this.