102 lines
2.8 KiB
ReStructuredText
102 lines
2.8 KiB
ReStructuredText
==============
|
|
cloud.libre.is
|
|
==============
|
|
Administrator documentation for Libre Cloud.
|
|
|
|
`<https://cloud.libre.is/>`_
|
|
|
|
The site is based on Nextcloud software.
|
|
|
|
`<https://nextcloud.com/>`_
|
|
|
|
|
|
Firewall
|
|
========
|
|
Open ports 80 and 443.
|
|
|
|
.. code-block:: cfg
|
|
|
|
-A INPUT -p tcp --dport 80 -j ACCEPT
|
|
-A INPUT -p tcp --dport 443 -j ACCEPT
|
|
|
|
|
|
Apache
|
|
======
|
|
Initial setup of Apache with Certbot.
|
|
|
|
.. code-block:: sh
|
|
|
|
sudo su -
|
|
apt install python3-certbot-apache
|
|
echo "cloud.libre.is" > /var/www/html/index.html
|
|
certbot -d cloud.libre.is
|
|
systemctl restart apache2
|
|
|
|
|
|
Nextcloud
|
|
=========
|
|
Get Nextcloud source.
|
|
|
|
.. code-block:: sh
|
|
|
|
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
|
|
wget https://download.nextcloud.com/server/releases/latest.tar.bz2.sha256
|
|
cat latest.tar.bz2.sha256 ; sha256sum latest.tar.bz2
|
|
|
|
|
|
Apache More
|
|
===========
|
|
Set up Apache for nextcloud.
|
|
|
|
.. code-block:: apache
|
|
|
|
<VirtualHost 70.39.110.157:80>
|
|
ServerName cloud.libre.is
|
|
ServerAdmin webmaster@localhost
|
|
DocumentRoot /var/www/html/nextcloud
|
|
ErrorLog ${APACHE_LOG_DIR}/error-cloud-libre-is.log
|
|
CustomLog ${APACHE_LOG_DIR}/access-cloud-libre-is.log combined
|
|
RewriteEngine on
|
|
ReWriteCond %{HTTPS} off
|
|
ReWriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
|
RewriteCond %{SERVER_NAME} =cloud.libre.is
|
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
Alias /nextcloud "/var/www/html/nextcloud/"
|
|
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
|
|
<Directory /var/www/html/nextcloud/>
|
|
Require all granted
|
|
AllowOverride All
|
|
Options FollowSymLinks MultiViews
|
|
<IfModule mod_dav.c>
|
|
Dav off
|
|
</IfModule>
|
|
</Directory>
|
|
</VirtualHost>
|
|
|
|
<VirtualHost 70.39.110.157:443>
|
|
ServerName cloud.libre.is
|
|
ServerAdmin webmaster@localhost
|
|
DocumentRoot /var/www/html/nextcloud
|
|
ErrorLog ${APACHE_LOG_DIR}/error-cloud-libre-is.log
|
|
CustomLog ${APACHE_LOG_DIR}/access-cloud-libre-is.log combined
|
|
RewriteEngine on
|
|
ReWriteRule ^(.*)$ https://%1$1 [L,R=301]
|
|
ErrorDocument 404 /en/404.html
|
|
#Include /etc/letsencrypt/options-ssl-apache.conf
|
|
Include /etc/letsencrypt/options-ssl-apache.conf
|
|
SSLCertificateFile /etc/letsencrypt/live/cloud.libre.is/fullchain.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/cloud.libre.is/privkey.pem
|
|
Alias /nextcloud "/var/www/html/nextcloud/"
|
|
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
|
|
<Directory /var/www/html/nextcloud/>
|
|
Require all granted
|
|
AllowOverride All
|
|
Options FollowSymLinks MultiViews
|
|
<IfModule mod_dav.c>
|
|
Dav off
|
|
</IfModule>
|
|
</Directory>
|
|
</VirtualHost>
|
|
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|
|
|