[GMG-Devel] MediaGoblin starting problem

ayleph ayleph at thisshitistemp.com
Tue Nov 18 11:06:13 EST 2014


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/"
  )

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.

-- 
ayleph


More information about the devel mailing list