I followed this german tutorial to set up a Raspberry 2 Owncloud Server (connect.de/ratgeber/so-installieren-sie-owncloud-auf-einem-raspberry-pi-1540246.html) everything worked fine without any Errors until ...
If I try to start the apache server with "sudo service apache2 start" but
[....] Starting web server: apache2apache2: Syntax error on line 268 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/sites-enabled/ssl: /etc/apache2/sites-enabled/ssl:1: <virtualhost> was not closed. Action 'start' failed. The Apache error log may have more information. failed!
Here are the 2 files in questions
line 268 : Include sites-enabled/
whole file http://pastebin.com/MrUY0Pu3
<virtualhost *:443> SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem DocumentRoot /var/www </virtualhost>
Before I messed arround with SSL the server worked fine.
Any help is highly appreciated.
Addendum: I used these commands to create a certificate:
sudo mkdir -p /etc/apache2/ssl sudo openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.pem sudo ln -sf /etc/apache2/ssl/apache.pem /etc/apache2/ssl/`/usr/bin/openssl x509 -noout -hash < /etc/apache2/ssl/apache.pem` sudo chmod 600 /etc/apache2/ssl/apache.pem
When asked for common name I used my dyn-dns
Then I replaced everything in /etc/apache2/ports.conf with this:
Listen 192.168.178.33:80 <IfModule mod_ssl.c> Listen 443 </IfModule>
Then I'd have to restart Apache with
sudo service apache2 reload
but this allready failed with the error message stated above.
Im quiet sure it was stupid, but I continued with the tutorial anyway. If wanted I can include the commands but they're allready in the picture as well as in the tutorial.
As a sidenote: Im pretty sure I f*cked up the apache2.conf.
I only added
ServerName my-dyndns.de and It hangs itself up just a line above that.