mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GMG-Devel] MediaGoblin starting problem


From: Прокси
Subject: Re: [GMG-Devel] MediaGoblin starting problem
Date: Fri, 24 Oct 2014 16:41:52 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On 2014-Oct-24 06:30, ayleph wrote:
> On Fri, Oct 24, 2014 at 03:24:26PM +0200, Прокси wrote:
> > Hello,
> > 
> > I'm trying to install MediaGoblin on my server. It is recommended to use
> > FastCGI. I'm using PHP-FPM, but instead of listening on localhost, I'm
> > using unix socket. Example command to start MediaGoblin is this:
> > 
> > ./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
> > 
> > Since my fastcgi_pass directive in nginx is 
> > 
> > unix:/var/run/php5-fpm-mediagoblin.sock;
> > 
> > instead of 
> > 
> > fastcgi_pass 127.0.0.1:26543;
> > 
> > how shoud I start MediaGoblin?
> 
> MediaGoblin is a python application. It will not work with your php fastcgi 
> socket. You should follow these instructions to configure fastcgi and nginx 
> to work with MediaGoblin.
> 
> http://mediagoblin.readthedocs.org/en/v0.7.1/siteadmin/deploying.html?highlight=nginx#fastcgi-and-nginx

Thanks, ayleph!

I managed to start the server, but now I have a different problem. I
want MG to be installed in subdirectory of my document root, so that url
is something like mydomain.tld/media

This means that all configuration parameters should be directory
specific. I put everything in 

location /media {
}

block and adjusted paths.

Here is how it looks:

               location /media {
                client_max_body_size 8m;
                add_header X-Content-Type-Options nosniff;

                autoindex off;
                default_type  application/octet-stream;
                sendfile on;
                gzip on;
                gzip_min_length 1024;
                gzip_buffers 4 32k;
                gzip_types text/plain text/html application/x-javascript 
text/javascript text/xml text/css;
                fastcgi_pass 127.0.0.1:26543;
                include /etc/nginx/fastcgi_params;
                fastcgi_param PATH_INFO $fastcgi_script_name;
                fastcgi_param SCRIPT_NAME "";


                # MediaGoblin's stock static files: CSS, JS, etc.
                location /media/mgoblin_static/ {
                  alias /home/user/www/media/mediagoblin/static/;
                }
                # Instance specific media:
                location /media/mgoblin_media/ {
                  alias /home/user/www/media/user_dev/media/public/;
                }
                # Theme static files (usually symlinked in)
                location /media/theme_static/ {
                  alias /home/user/www/media/user_dev/theme_static/;
                }
                # Plugin static files (usually symlinked in)
                location /media/plugin_static/ {
                  alias /home/user/www/media/user_dev/plugin_static/;
                }

        }

What I'm getting with this is 404 page that looks like this one:
http://mediagoblin.org/blog_images/mediagoblin_0.0.5_404.png

but with this text: "404 Not Found
The requested URL was not found on the server. If you entered the URL manually 
please check your spelling and try again."


Any suggestion how to make it work in this subdirectory?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]