My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Sunday, March 25, 2007

Securing MythWeb

Ok, in my last post I set up MythWeb. Now to lock it down so that it's not publicly accessible. I basically followed the directions at the KnoppMythWiki, with a couple of twists:
  1. I'm running Apache2
  2. I only locked down MythWeb and not my whole web space.
First I edited /etc/apache2/apache2.conf and added the following (I did it right before UseCanonicalName Off but I don't think it matters):

<Directory /var/www/mythweb>
AuthType Basic
AuthName "BasicAuth"
AuthUserFile /etc/apache2/basicauth
Require valid-user

Then I created /etc/apache2/basicauth with a mythtv user, setting the password in the process:
# htpasswd -c /etc/apache2/basicauth mythtv
Then I restarted apache and all was good:
# /etc/init.d/apache2 restart
Post a Comment