Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Walko
funkwhale
Commits
1955005a
Verified
Commit
1955005a
authored
7 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Moved commen nginx configuration in a dedicated snippet
parent
eef2ff3f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
deploy/funkwhale_proxy.conf
+13
-0
13 additions, 0 deletions
deploy/funkwhale_proxy.conf
deploy/nginx.conf
+3
-16
3 additions, 16 deletions
deploy/nginx.conf
docs/installation/index.rst
+2
-1
2 additions, 1 deletion
docs/installation/index.rst
with
18 additions
and
17 deletions
deploy/funkwhale_proxy.conf
0 → 100644
+
13
−
0
View file @
1955005a
# global proxy conf
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
X
-
Forwarded
-
Proto
$
scheme
;
proxy_set_header
X
-
Forwarded
-
Host
$
host
:$
server_port
;
proxy_set_header
X
-
Forwarded
-
Port
$
server_port
;
proxy_redirect
off
;
# websocket support
proxy_http_version
1
.
1
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Connection
$
connection_upgrade
;
This diff is collapsed.
Click to expand it.
deploy/nginx.conf
+
3
−
16
View file @
1955005a
...
...
@@ -48,20 +48,6 @@ server {
root
/srv/funkwhale/front/dist
;
# global proxy conf
proxy_set_header
Host
$host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-Proto
$scheme
;
proxy_set_header
X-Forwarded-Host
$host
:
$server_port
;
proxy_set_header
X-Forwarded-Port
$server_port
;
proxy_redirect
off
;
# websocket support
proxy_http_version
1.1
;
proxy_set_header
Upgrade
$http_upgrade
;
proxy_set_header
Connection
$connection_upgrade
;
location
/
{
try_files
$uri
$uri
/
@rewrites
;
}
...
...
@@ -70,6 +56,7 @@ server {
rewrite
^(.+)
$
/index.html
last
;
}
location
/api/
{
include
/etc/nginx/funkwhale_proxy.conf
;
# this is needed if you have file import via upload enabled
client_max_body_size
30M
;
proxy_pass
http://funkwhale-api/api/
;
...
...
@@ -89,6 +76,7 @@ server {
# Transcoding logic and caching
location
=
/transcode-auth
{
include
/etc/nginx/funkwhale_proxy.conf
;
# needed so we can authenticate transcode requests, but still
# cache the result
internal
;
...
...
@@ -97,14 +85,13 @@ server {
if
(
$request_uri
~
*
"[^
\
?]+
\
?(.*)
$
")
{
set
$query
$1
;
}
proxy_set_header
X-Forwarded-Host
$host
:
$server_port
;
proxy_set_header
X-Forwarded-Port
$server_port
;
proxy_pass
http://funkwhale-api/api/v1/trackfiles/viewable/?
$query
;
proxy_pass_request_body
off
;
proxy_set_header
Content-Length
""
;
}
location
/api/v1/trackfiles/transcode/
{
include
/etc/nginx/funkwhale_proxy.conf
;
# this block deals with authenticating and caching transcoding
# requests. Caching is heavily recommended as transcoding
# is a CPU intensive process.
...
...
This diff is collapsed.
Click to expand it.
docs/installation/index.rst
+
2
−
1
View file @
1955005a
...
...
@@ -59,10 +59,11 @@ Ensure you have a recent version of nginx on your server. On debian-like system,
apt-get update
apt-get install nginx
Then, download our sample virtualhost file:
Then, download our sample virtualhost file
and proxy conf
:
.. parsed-literal::
curl -L -o /etc/nginx/funkwhale_proxy.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf"
curl -L -o /etc/nginx/sites-enabled/funkwhale.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/nginx.conf"
Ensure static assets and proxy pass match your configuration, and check the configuration is valid with ``nginx -t``. If everything is fine, you can restart your nginx server with ``service nginx restart``.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment