[SOLVED] mythtv mythweb - need help with access

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] mythtv mythweb - need help with access

Postby mark9117 » Aug 6th, '15, 08:53

Well, it's come to this. I'm here with my hand out again. It's late. In the last 36 hours, I've been pounding my head against this for 30 hours on and off.

I've upgraded my Mageia 3 mythtv box to version 5. In doing so, I've come up against a couple of issues. One is lirc, but that's a different thread.

I need help with mythweb. I have installed task-lamp-php as well as mythtv-mythweb and phpmyadmin. This is a fresh install of Magia 5 and the applications mentioned in the previous sentence.

MythTV seems to be running just fine and I can access mythweb from the localhost, but only from the localhost. I want to be able to access it from my desktop, a laptop, wherever. At this point, that wherever is confined to my wifi network. I'll look at opening it up later, but for now, Iptables are disabled and security is wide open. Or it's supposed to be.

When attempting to access mythweb or phpmyadmin, I get stiffed by the browser. Mythweb returns a 403 "Access forbidden!" error. Seems really aggressive that error, what with the exclamation point and all. Whenever I see it I imagine it in with a German accent: "Achtung! Zutritt verboten!" But that's just because I'm tired and cranky.

This is a link to the /etc/httpd/conf/conf.d/mythweb.conf file: http://pastebin.com/bgWYMavD

Apache's /etc/httpd/conf/httpd.conf file is here: http://pastebin.com/LY2VWcX3


I appreciate any help I can get with this.

Thanks.

Mark
Last edited by mark9117 on Aug 10th, '15, 23:16, edited 1 time in total.
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: mythtv mythweb - need help with access

Postby arnesp » Aug 6th, '15, 23:22

My setup returns the same error for remote access. This is caused by the following lines in mythweb.conf:

Code: Select all
<Directory /var/www/mythweb>
    # Only allow localhost access by default. Customise to suit your needs
    # (customisations should be placed in a separate file in conf/vhosts.d/)
    Require local granted
</Directory>


You have already removed the above lines from your mythweb.conf, but in the process you may have removed too much.

Using your configuration file, I get an Object not found (404) error.

By making 2 changes to your configuration file, my remote access works the same as local access.

Uncommenting the following line:
Code: Select all
        RewriteBase    /mythweb


And re-adding the following line
Code: Select all
Alias /mythweb /var/www/mythweb


I assume the reason for disallowing remote access by default is to allow you to get security in place before opening for remote access. I only access mythweb through SSH port forwarding, which is seen by the server as local access.
arnesp
 
Posts: 60
Joined: Aug 6th, '15, 00:41

Re: mythtv mythweb - need help with access

Postby mark9117 » Aug 6th, '15, 23:46

I made those three changes with no effects. Just for good measure, I'm rebooting the system now. I realize that restarting httpd should have been enough, but I'm going to reboot just in case.

Always willing to look at other options.

Thanks.

Mark
Last edited by doktor5000 on Aug 7th, '15, 19:19, edited 1 time in total.
Reason: removed fullquote
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: mythtv mythweb - need help with access

Postby arnesp » Aug 7th, '15, 00:28

Just to make sure there is no misunderstanding:
Compared to the mythweb.conf file you linked to above, I only did the changes in the last 2 code sections to get remote access working (you write you made three changes)

/Arne
arnesp
 
Posts: 60
Joined: Aug 6th, '15, 00:41

Re: mythtv mythweb - need help with access

Postby mark9117 » Aug 7th, '15, 00:37

arnesp wrote:Just to make sure there is no misunderstanding:
Compared to the mythweb.conf file you linked to above, I only did the changes in the last 2 code sections to get remote access working (you write you made three changes)

/Arne


1) Added these lines to /etc/httpd/conf/conf.d/mythweb.conf:


Code: Select all
<Directory "/var/www/mythweb">
        # For Apache 2.2
        #Options -All +FollowSymLinks +IncludesNoExec
        # For Apache 2.4+
        Options +FollowSymLinks +IncludesNoExec
        Require all granted
    </Directory>


2) Uncommented the line: RewriteBase /mythweb

3) Verified that I still had the line: Alias /mythweb /var/www/mythweb

Still no joy.

I'm thinking it's got to be the mythweb.conf file -- phpmyadmin and dokuwiki work just fine from a non-localhost machine.

What's the minimum that file has to have?

Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: mythtv mythweb - need help with access

Postby arnesp » Aug 7th, '15, 01:23

I don't know about the minimum file, but the minimum change I have to make to enable mythweb access from a non-localhost machine, starting from the mythweb.conf file contained in the mythweb RPM, is to comment out the Require local granted line (second to last line)

/Arne
arnesp
 
Posts: 60
Joined: Aug 6th, '15, 00:41

Re: mythtv mythweb - need help with access

Postby mark9117 » Aug 7th, '15, 02:50

arnesp wrote:I don't know about the minimum file, but the minimum change I have to make to enable mythweb access from a non-localhost machine, starting from the mythweb.conf file contained in the mythweb RPM, is to comment out the Require local granted line (second to last line)

/Arne


Not sure what your mythweb.conf looks like, but here's an expurgated version of mine:

Code: Select all
Alias /mythweb /var/www/mythweb
    <Directory "/var/www/mythweb">
        # For Apache 2.2
        #Options -All +FollowSymLinks +IncludesNoExec
        # For Apache 2.4+
        Options +FollowSymLinks +IncludesNoExec
        Require all granted
    </Directory>

    <Directory "/var/www/mythweb" >

        <Files mythweb.*>
            setenv db_server        "localhost"
            setenv db_name          "mythconverg"
            setenv db_login         "mythtv"
            setenv db_password      "mythtv"

        <Files *.php>
            php_value file_uploads                  0
            php_value allow_url_fopen               On
            php_value zlib.output_handler           Off
            php_value memory_limit                  512M
           php_value max_execution_time 60
        </Files>

        RewriteEngine  on
        RewriteBase    /mythweb
        RewriteRule    ^(css|data|images|js|themes|skins|README|INSTALL|[a-z_]+\.(php|pl))(/|$)     -     [L]
        RewriteRule     ^(pl(/.*)?)$            mythweb.pl/$1               [QSA,L]
        RewriteRule     ^(.+)$                  mythweb.php/$1              [QSA,L]
        RewriteRule     ^(.*)$                  mythweb.php                 [QSA

        AllowOverride   All

        Options         FollowSymLinks
        AddType video/nuppelvideo   .nuv
        AddType image/x-icon        .ico

        <Files *.pl>
            SetHandler cgi-script
            Options +ExecCGI
        </Files>

    </Directory>


And once again, that configuration allows me to access mythweb from the localhost and only from the localhost (via the hostname, eg. "http://pvr/mythweb")

Thanks for the input Arne.
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: mythtv mythweb - need help with access

Postby arnesp » Aug 7th, '15, 09:10

I am using the one installed by the mga5 mythweb RPM (unmodified).
I just noticed that in your first post, you write that your mythweb.conf is in /etc/httpd/conf/conf.d/
The mga5 RPM installs it in /etc/httpd/conf/sites.d/ (via the /etc/httpd/conf/webapps.d/ link).
It might be worth checking if the upgrade has left you with two instances of mythweb.conf.

Anyway, in my setup, non-localhost access works with the expurgated version from your last post (after correction of a couple of syntax - presumably cut&paste - errors).

/Arne
arnesp
 
Posts: 60
Joined: Aug 6th, '15, 00:41

Re: [SOLVED] mythtv mythweb - need help with access

Postby mark9117 » Aug 10th, '15, 23:23

And once again I feel kind of stupid.

My Mythweb config file ("mythweb.conf") wound up in several places. I was working on the files in /etc/httpd/conf/conf.d. I was not able to gain access from anywhere but the local host. I beat my head against that from pretty much every angle. Then I stumbled onto /etc/httpd/conf/webapps.d/mythweb.conf.

At the bottom of that file I found this:
Code: Select all
<Directory /var/www/mythweb>
    # Only allow localhost access by default. Customise to suit your needs
    # (customisations should be placed in a separate file in conf/vhosts.d/)
    Require local granted
</Directory>


I changed the last config to "Require all granted", restarted apache and Hey! Presto! I've got access as it was before I rebuilt the system.

Thanks for all you time and attention here. I always find this place enlightening.

Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest