Ampache Requirements

Ampache has 3 requirements for a basic installation. These requirements are OS-Neutral meaning your operating system is not important as long as you can provide these 3 applications as a foundation.

  1. A web server, most commonly Apache.
  2. PHP
  3. MySQL

OS Specific Questions

Configuring Ampache with SSL

Ampache works perfectly with SSL. All you need to do is configure your webserver correctly and you're off and running. There are however a few catches.

  1. Most players do not support playback of HTTPS streams
  2. By default Ampache has the config option Force Http Playback turned on. This means that Amapche will write all Playlist urls with http. As such you'll need to have /play/index.php accessible on the http port at the same path point as your SSL instance.
    • Example ampache.conf is shown below
################################################################
#/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>

Clients Supporting SSL Streaming

  • Winamp Windows
  • VlC Windows,Linux,MacOS
    • Note: If you are running a non-root CA, also: settings>preferences>advanced>gnutls>uncheck the first box
 
os_foundation.txt · Last modified: 2010/08/08 12:21 by cslamar
 
Except where otherwise noted, content on this wiki is licensed under the following license: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