Nginx in front of Musicbrainz


#1

I want to run musicbrainz on was ec2 with nginx as a reverse proxy web server. As far as I can tell with the default setup as outlined here you end up with musicbrainz running on plackup which is only meant to be used in a dev environment.

I don’t have much experience with nginx or musicbrainz but as far as I can gather I need to use fastcgi in order to get requests proxying through nginx to the musicbrainz server. Is this correct? If so can is there some way I can use the nginx stuff here: https://github.com/metabrainz/musicbrainz-server/tree/master/admin/nginx


#2

I use Apache acting as a reverse proxy so requests get forwarded to port 5000.
You need to make sure the following variable is set before the musicbrainz server is started.
MUSICBRAINZ_USE_PROXY=1
I start the musicbrainz server from systemd and have a line to set this environment variable.

There is a proper way of running this with fastcgi but I could not get this working on my server.
A reverse proxy was easier for me to configure so I use that.