[mythtv-users] Hosting a web site on MythTV back end

David Brodbeck gull at gull.us
Thu Nov 29 05:24:13 UTC 2007

On Nov 28, 2007, at 9:04 PM, David Segall wrote:

> I would like to host my web site on the MythTV back end with the  
> minimum
> changes to MythTV. I'm happy to change the Apache configuration file 
> (s)
> but not the directory structure of the server.
> My aim is to have requests to http://tv.example.com go to the password
> protected MythTV directory. Requests to http://www.example.com and
> http://example.com would go to my site's web pages.

Read up on the <VirtualHost> directive, in the Apache docs.  What you  
want to do is called "named-based virtual hosting" in the documentation.

The specifics will depend on your setup, but basically you put

NameVirtualHost *

in your config file, then you define a <VirtualHost> section for each  
name, changing whatever directives you need to inside it.  e.g.:

<VirtualHost *>
	ServerName www.example.com
	DocumentRoot /usr/local/www/data/www.example.com/htdocs

<VirtualHost *>
	ServerName www.yoyodyne.com
	DocumentRoot /usr/local/www/data/www.yoyodyne.com/htdocs

...and so on.  Of course you can put the DocumentRoot for each server  
wherever you want.  You're not limited to ServerName and  
DocumentRoot, either; you can put <Directory> sections and most other  
server configuration settings inside a <VirtualHost> section.

More information about the mythtv-users mailing list