mal ganz ehrlich: dr*pbox & co sind doch eigentlich ne tolle sache, oder ? wenn da nicht mindestens zwei dinge wären:
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
sudo apt-get install lighttpd
die konfiguration liegt dann hier: /etc/lighttpd/lighttpd.conf
sudo groupadd www-data
sudo usermod -a -G www-data www-data
sudo apt-get install openssl
openssl genrsa -aes256 -out server.key 2048
openssl req -new -key server.key -out server.csr
bei common name den hostnamen oder den dyndns namen angebencp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 1825 -in server.csr -signkey server.key -out server.crt
cd ~
cat server.key server.crt > server.pem
sudo mkdir /etc/lighttpd/ssl
sudo cp server.pem /etc/lighttpd/ssl/server.pem
sudo cp server.crt /etc/lighttpd/ssl/server.crt
sudo chown root:root /etc/lighttpd/ssl/server.pem
sudo chmod 0400 /etc/lighttpd/ssl/server.pem
# SSL Server settings
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/server.pem"
ssl.ca-file = "/etc/lighttpd/ssl/server.crt"
# hier müsst ihr euren Hostname angeben
server.name = "raspberrypi"
server.document-root = "/var/www/owncloud"
ssl.use-sslv2 = "disable"
ssl.use-sslv3 = "disable"
ssl.use-compression = "disable"
ssl.honor-cipher-order = "enable"
ssl.cipher-list = "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-RC4-SHA:ECDHE-RSA-RC4-SHA:ECDH-ECDSA-RC4-SHA:ECDH-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA"
server.errorlog = "/var/log/lighttpd/serror.log"
accesslog.filename = "/var/log/lighttpd/saccess.log"
}
sudo apt-get install php5-common php5-cgi php5-sqlite php5-gd php5-curl php5-json php5-intl php-pear php-apc php-xml-parser curl libcurl3 libcurl3-dev php5-mcrypt exif
sudo lighty-enable-mod fastcgi-php
sudo service lighttpd restart
sudo apt-get install sqlite3
cd ~
wget https://download.owncloud.org/community/owncloud-8.0.4.tar.bz2
tar -jxvf owncloud-8.0.4.tar.bz2
cd ~
sudo rm -f /var/www/index.lighttpd.html
sudo cp -r owncloud /var/www
jetzt noch ein paar sicherheitseinstellungen am lighttpd vornehmen. am ende einkopieren
sudo service lighttpd stop
sudo nano /etc/lighttpd/lighttpd.conf
$HTTP["url"] =~ "^/owncloud/data/" {
url.access-deny = ("")
}
$HTTP["url"] =~ "^/owncloud($|/)" {
dir-listing.activate = "disable"
}
server.document-root = "/var/www/owncloud"
und die verzeichnisrechte anpassensudo find /var/www/owncloud/ -type f -print0 | sudo xargs -0 chmod 0640
sudo find /var/www/owncloud/ -type d -print0 | sudo xargs -0 chmod 0750
sudo mkdir -p /var/www/owncloud/data
sudo chown -R root:www-data /var/www/owncloud/
sudo chown -R www-data:www-data /var/www/owncloud/apps/
sudo chown -R www-data:www-data /var/www/owncloud/config/
sudo chown -R www-data:www-data /var/www/owncloud/data/
sudo chown root:www-data /var/www/owncloud/.htaccess
sudo chmod 0644 /var/www/owncloud/.htaccess
jetzt noch das default charset auf utf-8 setzen, damit es keine probleme mit sonderzeichen gibtsudo nano /etc/php5/cgi/php.ini
default_charset = "UTF-8"
sudo apt-get install unattended-upgrades update-notifier-common
sudo dpkg-reconfigure -plow unattended-upgrades
sudo nano /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
sudo nano /etc/ssh/sshd_config
PermitRootLogin no
Port 12345
sudo apt-get install fail2ban
sudo apt-get install ntfsprogs
sudo mkdir /media/usb-hdd
tail –f /var/log/messages
sda: sda1
sudo blkid /dev/sda1
sudo nano /etc/fstab
UUID=8AD08510D08503A3 /media/usb-hdd/ ntfs-3g permissions,defaults,auto
sudo nano /var/www/owncloud/config/config.php
sudo mkdir -p /media/usb-hdd/owncloud
sudo chown www-data:www-data /media/usb-hdd/owncloud
sudo cp /var/www/owncloud/data /media/usb-hdd/owncloud
sudo chown -R www-data:www-data /media/usb-hdd/owncloud
sudo find /media/usb-hdd/owncloud -type d -exec chmod 750 {} ;
sudo find /media/usb-hdd/owncloud -type f -exec chmod 640 {} ;
sudo chown root:www-data /media/usb-hdd/owncloud/data/.htaccess
sudo chmod 0644 /media/usb-hdd/owncloud/data/.htaccess
sudo service lighttpd restart