Talk:MythWeb on Nginx

From MythTV Official Wiki
Jump to: navigation, search

No screenshots with nginx?

I followed the article, but I'm not getting any screenshots (both in recorded programs and in remote) with nginx. Anyone know why? I'm using nginx 1.1.8 with mythweb 0.24 on Gentoo.

(It's not a perl issue because I can get them with lighttpd with perl disabled)

Thanks! --Alec 22:45, 22 November 2011 (UTC)


What else "needs to be expanded" on this page? --davesp

Perl config

I have the perl backend working on Ubuntu 12.04 with fcgiwrap and spawn-fcgi. My mythweb.include looks like this:

location ^~ /mythweb {
        index mythweb.php;
        try_files $uri $uri/ @mythweb_handler;

        location ~ [^/]\.php(/|$) {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                if (!-f $document_root$fastcgi_script_name) {
                        return 404;
                }
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                include fastcgi_params;
                include mythweb.fastcgi_params;
        }

        location ~ [^/]\.pl(/|$) {
                fastcgi_split_path_info ^(.+?\.pl)(/.*)$;

                # Disable gzip (it makes scripts feel slower since they have to complete before getting gzipped)
                gzip off;

                fastcgi_pass unix:/var/run/fcgiwrap.socket;
                include fastcgi_params;
                include mythweb.fastcgi_params;
        }
}

location @mythweb_handler {
        rewrite /mythweb/(.+\.(php|pl))/.*      /mythweb/$1 last;
        rewrite /mythweb/(pl(/.*)?)$            /mythweb/mythweb.pl/$1 last;
        rewrite /mythweb/(.+)$                  /mythweb/mythweb.php/$1 last;
        rewrite /mythweb/(.*)$                  /mythweb/mythweb.php last;
}

mythweb.fastcgi_params contains the myth specific fastcgi_param's that are shared between php and perl - db_server, db_name, etc.