Personal tools
You are here: Home Linux I/O OpenShowCenter with Apache HTTPD
 

OpenShowCenter with Apache HTTPD

Howto install openshowcenter on a CentOS 5.x VM using Apache HTTPD as a web server

This is how OpenShowCeneter was installed using my third most favourite web server. Attempts to get it working with nginx and lightty had very mixed results (probably related to fast-cgi issues, and/or php error reporting).

 

Prerequisites

  • CentOS 5.x VM, minimal packages plus a few
  • Media files to play (these are in /files/{mp4,mp3,photo} in the example below)

Install RPMS

# yum install httpd php php-pear zip

 

Open Show Centre v0.24

This is to support delivery media content to a Neuston. Download openshowcenter v0.24. Extract the distribution into /srv/, which creates a top level directory '/srv/openshow

center_v0.24'. Create a symbolic link that is version independant that we will point the web server to:

# ln -s /srv/openshowcenter_v0.24 /srv/openshowcenter

Note: OpenShowCenter needs php, php-pear and zip RPM's. Without zip support, the error "Undefined variable: zip in /srv/openshowcenter_v0.24/system/viewfunctions.php" is generated.

 

chown -v -R nobody.nobody /srv/openshowcenter_v0.24/*
chown -v apache.apache /srv/openshowcenter_v0.24/modules/**/config.ini
chmod -v 644 /srv/openshowcenter_v0.24/modules/**/config.ini
chown -v apache.apache /srv/openshowcenter_v0.24/logs
chmod -v 755 /srv/openshowcenter_v0.24/logs

mkdir /srv/openshowcenter_v0.24/media
ln -s /files/mp3 /srv/openshowcenter_v0.24/media/music
ln -s /files/mp4 /srv/openshowcenter_v0.24/media/movie
ln -s /files/photo /srv/openshowcenter_v0.24/media/photo

IMPORTANT: The default fonfiuration for php settings the logging to "error_reporting = E_ALL", which generates a lot of messages on the web interface. To disable this, edit '/etc/php.ini', and the the error_reporting to "error_reporting = E_ALL & ~E_NOTICE" by uncommenting this option (and commenting out the default).

Apache HTTPD

Prune the apache httpd configuration down to just the bare minimum. This reduces the memory footprint down to something reasonable (approximately 5.5Mbytes resident).

ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

LoadModule auth_basic_module  modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authz_default_module modules/mod_authz_default.so

LoadModule log_config_module  modules/mod_log_config.so
LoadModule mime_magic_module  modules/mod_mime_magic.so
LoadModule mime_module        modules/mod_mime.so
LoadModule deflate_module     modules/mod_deflate.so
LoadModule dir_module         modules/mod_dir.so
LoadModule php5_module        modules/libphp5.so

TypesConfig /etc/mime.types
MIMEMagicFile conf/magic

User apache
Group apache

AddHandler php5-script .php
AddType    text/html   .php

ServerAdmin webmaster@lucidsolutions.co.nz
UseCanonicalName Off

Listen 8000
<VirtualHost *:8000>
        DocumentRoot /srv/openshowcenter
        DirectoryIndex index.php
        Options Indexes FollowSymLinks
</VirtualHost>

IPTables

Use a standard IPTables configuration, and add the following rule to allow access from the local LAN to OpenShowCeneter on TCP port 8000.

# HTTP/openshowcenter
-A tcpIn -p tcp -m tcp --dport 8000 --source 192.168.0.0/24 -m state --state NEW -j ACCEPT

Starting services

Configure the services to start on boot.

# chkconfig httpd on
# service httpd start

Links

 

Appendices

yum

# yum install httpd php php-pear zip

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 php                     x86_64     5.1.6-20.el5_2.1  updates           1.2 M
 php-pear                noarch     1:1.4.9-4.el5.1  base              356 k
 zip                     x86_64     2.31-1.2.2       base              135 k
Installing for dependencies:
 apr                     x86_64     1.2.7-11         base              118 k
 apr-util                x86_64     1.2.7-7.el5      base               74 k
 aspell                  x86_64     12:0.60.3-7.1    base              946 k
 aspell-en               x86_64     50:6.0-2.1       base              1.6 M
 curl                    x86_64     7.15.5-2.el5     base              229 k
 gmp                     x86_64     4.1.4-10.el5     base              201 k
 httpd                   x86_64     2.2.3-11.el5_1.centos.3  base              1.1 M
 libidn                  x86_64     0.6.5-1.1        base              195 k
 mailcap                 noarch     2.1.23-1.fc6     base               14 k
 php-cli                 x86_64     5.1.6-20.el5_2.1  updates           2.2 M
 php-common              x86_64     5.1.6-20.el5_2.1  updates           155 k
 postgresql-libs         x86_64     8.1.11-1.el5_1.1  base              195 k

Transaction Summary
=============================================================================
Install     15 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 8.5 M

Document Actions