Opened 3 years ago

Last modified 3 years ago

#5504 new enhancement

Support alternate URL prefixes

Reported by: Vaelatern Owned by:
Priority: minor Milestone:
Component: programming Keywords:
Cc: Parent Tickets:


In the scenario where the user (me) wants to run Mediagoblin under, for example,, mediagoblin makes this very difficult.

I was able to route /mgoblin_static to /mg/mgoblin_static, and was able to serve the main page under /mg, but was unable to use the site as other actions (like submitting new media) brought me back to / rooted URLs.

Official support for prefixes would be quite nice for people who want to have small setups, or don't want to have a subdomain for this program.


Change History (1)

comment:1 Changed 3 years ago by ayleph

I run a MediaGoblin instance under /mediagoblin with no problems, and I didn't have to modify any MediaGoblin code to do so. This may be an issue with your webserver configuration rather than an issue with MediaGoblin itself. Here's the relevant section of my lighttpd config file, for reference.

$HTTP["host"] == "" {
  server.document-root = "/srv/http/vhosts/"

  alias.url += (
    "/mgoblin_static" => "/srv/mediagoblin/mediagoblin/mediagoblin/static/",
    "/mgoblin_media/" => "/srv/mediagoblin/mediagoblin/user_dev/media/public/",
    "/theme_static/" => "/srv/mediagoblin/mediagoblin/user_dev/theme_static/",
    "/plugin_static/" => "/srv/mediagoblin/mediagoblin/user_dev/plugin_static/"

  $HTTP["url"] =~ "^/mediagoblin/" {
    fastcgi.server = ( "/mediagoblin" =>
      ( "localhost" =>
        ( "host" => "",
          "port" => 26543,
          "docroot" => "/srv/mediagoblin/mediagoblin/mediagoblin",
          "check-local" => "disable",
          "max-procs" => 1,
          "fix-root-scriptname" => "enable"
Note: See TracTickets for help on using tickets.