Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed 2 different web applications on my dedicated Debian 6. the first one sits inside /var/www/cast and the url assigned is `


I installed the second one that is called Airtime.the second instalation didnt offer an install path so it installed automaticaly whenever i try to enter the first one i get the second one..if i try

it leads to Airtime. if i go to

it also lead there..

This is the enries on airtime-vhost file

<VirtualHost *:80>


      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

Any thoughts on how i can give them both a unique url?

share|improve this question
Do you own the domain, and can you create additional subdomains for it? Also, you might want to replace the domain with unless you want everyone that views this question to visit it and possibly start snooping around. – Darth Android Aug 15 '12 at 14:24
thanx for the tip m8...i have root access but i dont own the domain.. – Trance84 Aug 15 '12 at 14:34
its a rented dedicated – Trance84 Aug 15 '12 at 14:35
up vote 2 down vote accepted

It sounds like Airtime comes with its own web server, but "cast (whatever that is) doesn't. Is this correct?

Anyway, the general problem can be handled in many ways:

  • You can run both applications within the same web server, if possible. This would only be impossible if one of the applications depends on a very specific version of the web server (assuming Apache based on the Airtime config file) that is incompatible with the other application. But if you can get all the requisite Apache modules loaded into a single instance of Apache, sufficient to run both apps, then yes, you just have to put each application in a separate path within the document root, e.g. /var/www/airtime and /var/www/cast, and it'll "just work". Alternately, you can map any directory in the filesystem into the document root, either by simlinking into /var/www, or by Apache config directives.

  • You can run two different web servers but run them on different ports. This will change the URL to at least one of the instances to require a port number after the domain, e.g. where the :8080 is the port (I recommend choosing a value greater than 1024 but less than 65000, and google the number before using it to make sure it's not a well known port for a service you are already running).

  • You can run two different web servers but run them on different IP addresses. You can keep the port default at 80 (or 443 for https) this way, but you'll need two different IPs.

  • You can run two different web servers but run them on the same IP address but on different subdomains. You can then use URL Rewriting to automatically map requests to to the airtime application and from to the cast application.

  • For all of the above, you can even do it within one web server if the configuration is robust enough -- and the Apache web server is robust enough to do all of the above within one web server instance, although you'll need some more exotic configuration settings for some of the choices. Note that I highly recommend trying to run it all within one web server instance first, because this way is more flexible and easier to manage, plus you probably can configure it without having to worry about ports or IP addresses, which complicate things for your users in the former case and for you in the latter case.

The problem with the Airtime config is that it's trying to be a vhost for *:80 which means that every request to your server on port 80 is going to be mapped into the document root for airtime, i.e. /usr/share/airtime/public. You need to get both the cast application and the airtime application within the same vhost, or else, constrain the vhost of airtime from *:80 to something like so that only requests to that subdomain will get passed to airtime.

Your Apache config that comes builtin with Debian is at /etc/apache2/ directory, so go there and look at apache.conf. Notice that it also has a <VirtualHost *:80> directive. Well, you can't have two virtual hosts claiming to handle all requests on port 80; only one of them can win. Therein lies the problem.

share|improve this answer
hey buddy thanx for the reply..from all the options you suggested..changing the port for airtime would be can i do that? if i change the 80 to 2199 for example..i get Restarting web server: apache2[Wed Aug 15 17:04:47 2012] [warn] NameVirtualHost *:80 has no VirtualHosts ... waiting [Wed Aug 15 17:04:48 2012] [warn] NameVirtualHost *:80 has no VirtualHosts when restarting the apache – Trance84 Aug 15 '12 at 15:06
Make sure the /var/www/cast's vhost config is still running on port 80. – Darth Android Aug 15 '12 at 15:37
not quite sure how..but ill figure it out, thanx guys, – Trance84 Aug 15 '12 at 16:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.