[GMG-Devel] MediaGoblin starting problem

Прокси proxy-one at mail.ru
Tue Nov 18 11:57:05 EST 2014


On 2014-Nov-18 08:06, ayleph wrote:
> On 11/18/2014 07:52 AM, ayleph wrote:
> > 
> > I think it's mostly just configuring your webserver to serve fastcgi
> > content from a subdirectory (which is arguably outside the scope of
> > MediaGoblin installation instructions). However, if memory serves,
> > you're using Nginx, and I can't help you with that. I use Lighttpd.
> 
> I read back through the thread and saw some things that don't look
> correct. Please see my comments below.
> 
> On 10/24/2014 07:41 AM, Прокси wrote:
> >
> > 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 {
> >
> >                 # 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/;
> >                 }
> 
> I don't think this is correct. Even though I run mediagoblin at
> domain.tld/mediagoblin, my alias directives in lighttpd look like below.
> I don't include my subdirectory in the alias url.
> 
>   alias.url += (
>     "/mgoblin_static" => "/path/to/mediagoblin/mediagoblin/static/",
>     "/mgoblin_media/" => "/path/to/mediagoblin/user_dev/media/public/",
>     "/theme_static/" => "/path/to/mediagoblin/user_dev/theme_static/",
>     "/plugin_static/" => "/path/to/mediagoblin/user_dev/plugin_static/"
>   )

When /media prefix is removed from alias, nginx refuse to start.

 Restarting nginx: nginx: [emerg] location "/mgoblin_static/" is outside
 location "/media" in /etc/nginx/sites-enabled/website:247

I moved alias directives from "location /media {}" and nginx started. I was
able to create account and log in. Uploading of a picture, on the other hand,
failed. 

YEOWCH... that's an error!

.-------------------------.
|     __            _     |
|    -, \_,------,_//     |
|     <\  ,--   --.\      |
|      / (x  ) ( X )      |
|      '  '--, ,--'\      |
|     / \ -v-v-u-v /      |
|     .  '.__.--__'.\     |
|    / ',___/ / \__/'     |
|    | |   ,'\_'/, ||     |
|    \_|   | | | | ||     |
|     W',_ ||| |||_''     |
|      |  '------'|       |
|      |__|     |_|_      |
|     ,,,-'     '-,,,     |
'-------------------------'
  

Something bad happened, and things broke.

If this is not your website, you may want to alert the owner.

I think this is the relevant part of lazyserver output:

OSError: [Errno 13] Permission denied: '/media/user_dev'

I changed permissions of this dir to 777 but no joy. 

One thing I noticed, of four aliased directory, only one exists, first one,
/home/user/www/media/mediagoblin/static/

In /home/user/www/media/user_dev/media/ exist only workbench directory. No theme_static or plugin_static directories in /home/user/www/media/user_dev

Is that OK or something is missing in my installation?

> On 10/24/2014 08:16 AM, Proxy wrote:
> >
> > I added this
> >
> > [composite:routing]
> > use = egg:Paste#urlmap
> > /media = mediagoblin
> > /media/mgoblin_media/ = publicstore_serve
> > /media/mgoblin_static/ = mediagoblin_static
> > /media/theme_static/ = theme_static
> > /media/plugin_static/ = plugin_static
> 
> I don't think this is correct either. My paste_local.ini routing section
> still has the default values below.
> 
> /mgoblin_media = %(here)s/user_dev/media/public
> /mgoblin_static = %(here)s/mediagoblin/static
> /theme_static = %(here)s/user_dev/theme_static
> /plugin_static = %(here)s/user_dev/plugin_static
> 
> 
> Your webserver config should handle the subdirectory stuff, and when it
> passes the fcgi request to mediagoblin, mediagoblin doesn't need to know
> it's behind a subdirectory.

Changed paste_local.ini to default values. 


More information about the devel mailing list