-
Notifications
You must be signed in to change notification settings - Fork 135
Reverse Proxy
evulhotdog edited this page Dec 17, 2017
·
6 revisions
Meteor apps can easily be hosted behind an Nginx webserver by configuring a reverse proxy. You should be using an nginx version >= 1.4, for the best support of WebSockets.
Here is an example configuration that uses a custom port and url base:
server {
# [...other configuration...]
location /requests {
proxy_pass http://127.0.0.1:3000/requests;
proxy_set_header Host $http_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;
}
}
Then you have to launch meteor
with a custom ROOT_URL
:
$ ROOT_URL=http://127.0.0.1:3030/requests meteor
or if you have plexrequests as a systemd service, add this line under [Service]
Environment=ROOT_URL=http://localhost:3000/requests
Voilà! You can now access Plex Requests at https://your.domain/requests
You have secured your server with Let's Encrypt right? I recommend the lightweight letsencrypt.sh script.
Reference: