Ampache mit SSL

Ampache arbeitet perfekt mit SSL zusammen. Dazu müssen Sie lediglich Ihren Webserver korrekt einrichten. Trotzdem gibt es einige Dinge die Sie beachten müssen.

  • Die meisten Player unterstützen keine Wiedergabe von HTTPS Streams
  • Eine Beispiel ampache.conf sieht so aus:
################################################################
#/etc/apache2/conf.d/ampache.conf
#
# This configuration file redirects all inbound http requests to
# the ssl port of your system, with the exception of the play
# directory. Therefore, music will still stream over port 80.
#
# Apache Modules needed: rewrite, php5
#
# make sure httpd.conf includes /etc/apache2/conf.d/*.conf
# or place the script in the appropriate directory.
#
# You need to change absolute directories to ampache directory.
# Optionally, you can set sess_cookiesecure  = 1
# in config/ampache.cfg.php
#
# Tested on  Apache 2.0.63 on SUSE 10.3, 
# Kai Gemba. Aug.20 2008, kgemba@csulb.edu
#################################################################
<IfModule mod_php5.c>
# Exception for the play directory
 <Directory /srv/www/htdocs/music/play>
  RewriteEngine on
  Options -Indexes +FollowSymLinks -ExecCGI
  RewriteCond %{SERVER_PORT} !^80$
  RewriteRule index.php http://%{HTTP_HOST}/music/play/index.php [NC,R,L]
 </Directory>
# Force ampache to be ssl
 <Directory /srv/www/htdocs/music>
  RewriteEngine on
  Options +Indexes +FollowSymLinks +ExecCGI
  AllowOverride None
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://%{HTTP_HOST}/music/$1 [NC,R,L]
 </Directory>
# Extra Security for bin and config
 <Directory /srv/www/htdocs/music/bin>
  Order deny,allow
  Deny from all
 </Directory>
 <Directory /srv/www/htdocs/music/config>
  Order deny,allow
  Deny from all
 </Directory>
</IfModule>

Deswegen hat Ampache standardmäßig die Option Force Http Playback aktiviert. Das bedeutet, dass Ampache alle Playlisten mit der URL http erstellen wird. So brauchen Sie nur /play/index.php durch Ihren HTTP Port and dem gleichen Punkt wie die SSL Instanz erreichbar zu machen.

Clients mit SSL Unterstützung

  • Winamp Windows
  • VlC Windows,Linux,MacOS
    • Hinweis: Wenn Sie ein non-root CA haben, müssen Sie erst unter settings > preferences > advanced > gnutls die erste Option deaktivieren
 
de/install/ssl.txt · Zuletzt geändert: 2009/05/11 23:29 von fabian
 
Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki