Opened 6 years ago

Closed 2 years ago

#5504 closed enhancement (no-action)

Support alternate URL prefixes

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

Description

In the scenario where the user (me) wants to run Mediagoblin under, for example, example.com/mg/, 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 (2)

comment:1 by ayleph, 6 years ago

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"] == "example-mediagoblin-site.com" {
  server.document-root = "/srv/http/vhosts/example-mediagoblin-site.com/htdocs/"

  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" => "127.0.0.1",
          "port" => 26543,
          "docroot" => "/srv/mediagoblin/mediagoblin/mediagoblin",
          "check-local" => "disable",
          "max-procs" => 1,
          "fix-root-scriptname" => "enable"
        )
      )
    )
  }
}

comment:2 by Ben Sturmfels, 2 years ago

Resolution: no-action-required
Status: newclosed

Closing as there haven't been any recent updates to this bug report. Vaelatern, please let us know if you're still seeing this issue.

Regards,
Ben

Note: See TracTickets for help on using tickets.