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: Boris Bobrov
Subject: Re: [GMG-Devel] MediaGoblin starting problem
Date: Fri, 24 Oct 2014 18:51:58 +0400
User-agent: KMail/1.13.7 (Linux/3.14-0.bpo.2-686-pae; KDE/4.8.4; i686; ; )

В сообщении от Friday 24 of October 2014 18:41:52 Прокси написал:
> 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?

I'm not sure, but I'd try this:
1. cp paste.ini paste_local.ini;
2. edit composite:routing section in paste_local.ini  and prepend paths 
there with "/media", that is "/ = mediagoblin" -> "/media/ = mediagoblin"

-- 
С наилучшими пожеланиями, 
Boris

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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