Saturday, April 23, 2005

Password access to mythweb

From howto:

$ cd ~/mythplugins-0.18/mythweb
$ su
# mkdir /var/www/html/mythweb
# cp -r . /var/www/html/mythweb
# exit
$

Edit the /var/www/html/mythweb/config/conf.php file if required.

By default, MythWeb uses an Apache .htaccess file to restrict access to the website and to configure some variables.

To create the password file for Apache (if your system doesn't already have one), you could do something like this:

# cd /var/www
# htpasswd -c htpasswd mythtv
New password:
Re-type new password:
Adding password for user mythtv

See the man page for htpasswd for more examples.

To access the web page, open a web browser and use http://[name or ip address]/mythweb/

Not in howto docs:

Uncomment these lines in mythweb/.htaccess

AuthType Basic
AuthName "MythTV"
AuthUserFile /var/www/htpasswd
Require valid-user

Edit httpd.conf:



# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# Changed by DCL for mythweb authentication.
#AllowOverride None
AllowOverride All

Common error message:

> Warning at
> /var/www/html/mythweb2/includes/init.php, line 46: session_start()
> [function.session-start]:
> open(php_sessions/sess_8456ca958bc5b001433bd3c12026d33c, O_RDWR) failed:
> Permission denied (13)

(this is explained in the README file)

So, allow apache write access to the 'php_sessions' dir:

[root@be mythweb]# pwd
/var/www/html/mythweb
[root@be mythweb]# chown apache php_sessions/

If you can't see thumbnail previews:
# chown apache image_cache/

Restart apache:
# service httpd restart

0 Comments:

Post a Comment

<< Home