Running Airtime on subdomain
  • Hi all,

    Im having serious problems running airtime on a subdomain (2nd vhost). I have a CMS install running on the primary domain (lets call it abc.dk) - and I want airtime to run on airtime.abc.dk. The CMS is all fine and dandy, but Airtime shows a really irratic behaviour.
    I installed Airtime via the airtime-repo on the Ubuntu 12.04, and configured it as the installation docs said. airtime-check-system runs through just fine ("-- Your installation of Airtime looks OK!") , but the interface is dodgy, and doesnt quite work. The calendar doesnt show anything. I cant add content to shows, and streaming doesnt work. The icecast server works fine itself.
    I've edited airtime.conf and api_client.cfg - where i changed the "host" to airtime.abc.dk instead of the default, and "base_url" to airtime.abc.dk.

    My vhost config for airtime looks like this:

    VirtualHost *:80>
            ServerAdmin webmaster@localhost
            ServerName airtime.abc.dk
            DocumentRoot /usr/share/airtime/public
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
    Alias /airtime /usr/share/airtime/public

    SetEnv APPLICATION_ENV "production"

    <Directory /usr/share/airtime/public>
      DirectoryIndex index.php
            Options -Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>

            ErrorLog ${APACHE_LOG_DIR}/error.log

            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel warn

            CustomLog ${APACHE_LOG_DIR}/access.log combined

    </VirtualHost>

    Something tells me that Airtime only runs 100% perfect when its alone on the apache server, but can anyone point me in the right direction?
  • 11 Comments sorted by
  • When inspecting with the dev tools on Chrome, i can see that the server throws a 503 at me. Looking at the dev info, I see this - this is when trying to access the calendar page, which shows up empty.

    1. Request URL:
    2. Request Method:
      POST
    3. Status Code:
      503 Service Unavailable
    Post edited by Jesper J at 2014-01-20 19:01:35
  • Also, when following your FAQ to change port/hostname/directory of Airtime, it fails. Airtime-check-system returns all kinds of errors after modifying airtime.conf, and api_client.cfg and after the two service restarts. Definitely doesnt work.

    Does anyone have a success story about this?? :)
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    if you are not ni apache 2.4 try this :

    <VirtualHost *:80>
          ServerName subdomain.myradio.fr
          #ServerAlias www.example.com

          ServerAdmin admin@myserver

          DocumentRoot /usr/share/airtime/public
          DirectoryIndex index.php

          SetEnv APPLICATION_ENV "production"

          <Directory /usr/share/airtime/public>
                  Options -Indexes FollowSymLinks MultiViews
                  AllowOverride All
                  Order allow,deny
                  Allow from all
          </Directory>
    </VirtualHost>

    don't forget this line in your ports.conf :

    NameVirtualHost *:80


  • Hi Albert,

    thank you for your reply! But im on Ubuntu 12.04, which means that im on the latest stable Apache2 for that dist:

    Server version: Apache/2.2.22 (Ubuntu)

    My vhost looks like this:

    <VirtualHost *:80>
            ServerAdmin webmaster@localhost
            ServerName airtime.heartbeats.djj.dk
            DocumentRoot /usr/share/airtime/public
            DirectoryIndex index.php
            SetEnv APPLICATION_ENV "production"
    <Directory /usr/share/airtime/public>
            Options -Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>
            ErrorLog ${APACHE_LOG_DIR}/error.log
            LogLevel warn
            CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>

  • Test this by have two different virtual host and remember to enabling the sites after you are finished.

    I would take out the directives first for testing purpose and customize ,if all works well

    <VirtualHost *:80>
    ServerName www.heartbeats.djj.dk
    DocumentRoot /www/heartbeats
    DirectoryIndex index.php
    # Other directives here

    </VirtualHost>

    <VirtualHost *:80>
            ServerAdmin webmaster@localhost
            ServerName airtime.heartbeats.djj.dk
            DocumentRoot /usr/share/airtime/public
            DirectoryIndex index.php
       # Other directives here
            
    </VirtualHost>

    please note the order of the virtual hosts .with the top one being the main or primary domain

    If you already have a virtual host (www.heartbeats.djj.dk)

    then Just enable the new virtual hosts
    sudo a2ensite airtime.heartbeats.djj.dk

    If not enable the main domain [ will not hurt if you already have it enable]
    sudo a2ensite www.heartbeats.djj.dk

    sudo service apache2  restart

    V.O.I.S.S.E.S
    Can You Hear Me Now

    Post edited by Voisses Tech at 2014-01-21 10:12:20
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • They are both enabled and functioning separately. The airtime interface is partly working, as you may be able to see from my earlier post, so the vhost setup seems to be working fine. I think Airtime is having a hard time sharing apache with other vhosts (on the default site).

    Does anyone have Airtime running on a vhost, which is NOT the default site ("catch all", if you'd call it that)? Its pretty frustrating, as there are no real errors telling me where to look, or what to look for.

    Does any of you Airtime support folks know what might be going on?
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Jesper, Airtime can share Apache with other hosts, I have it running next to Newscoop all the time. I see in your original configuration you had the line:

    Alias /airtime /usr/share/airtime/public

    which is for running Airtime in a subdirectory, not a subdomain. So first I would clear the cache in your browser to make sure it is accessing files from the latest configuration.

    Also, did you run the
    airtime-update-db-settings
    command after changing base_url? See:

    http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/host-configuration/

    Please let us know how you get on.

    Cheers!

    Daniel
    Post edited by Daniel James at 2014-01-22 10:36:19
  • This is what I use on my test machine and  modified when I used on my subdomains.

    • When you want your main domain just do www.domain.com and to get the airtime subdomain you must type www.domain.com/login  or www.domain.com/index.php
    • What I can tell you is make sure your .htacess look almost like what is on a default ubuntu lamp install.
    • note this is just the sites enable default installation,you can modify the directives to do things like fancyindexing,redirects,etc.
    • The order of the virtual host matters the top is your primary and so make sure you have 404,504 etc pages are setup as non matching request will be directed to the airtime login


    Code

    <VirtualHost *:80>
          #ServerName localhost
          #ServerAlias www.example.com
          ServerName localhost
          ServerAdmin root@localhost

          DocumentRoot /usr/share/airtime/public
          DirectoryIndex index.php

          SetEnv APPLICATION_ENV "production"

          <Directory /usr/share/airtime/public>
                  Options -Indexes FollowSymLinks MultiViews
                  AllowOverride All
                  Order allow,deny
                  Allow from all
          </Directory>
    </VirtualHost> 


    <VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
            Deny from all
            Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>

    </VirtualHost>

     You can have a look at this tutorial .They are good folks

    If you have other virtual host (like say a webserver and other server) you can put them in separate configuration or list below

    just remember to change the favicon in the airtime directory to look like yours.
    Post edited by Voisses Tech at 2014-01-23 10:01:43
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Hi again.

    I never got it working, as I had a deadline to meet at the time - but it certainly should work. I hope other people are able to make it work :-)

    Thank you for your help!
  • Post edited by Voisses Tech at 2014-02-27 18:50:58
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.