This repository has been archived by the owner on Jun 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
nginx: Add reverse http(s) proxy for users #155
Open
mayli
wants to merge
6
commits into
hashbang:master
Choose a base branch
from
mayli:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1938cbf
nginx: add and pin nginx from nginx.org
mayli 7dc3246
committing changes in /etc after apt run
mayli 13d0985
nginx: add config files for uds reverse proxy
mayli 22d1f6e
PAM: Create symlinks needed by nginx
KellerFuchs 3848c20
nginx/symlinks: Fixup (do not create links for system users)
KellerFuchs d161481
Merge branch 'master' into master
mayli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh -e | ||
USER="${PAM_USER}" | ||
UID=$(id -u "$USER") | ||
XDG_RUNTIME_DIR="/run/user/${UID}" | ||
NGINX_SOCK_DIR="/run/http" | ||
|
||
for proto in http https; do | ||
SOCKET_LINK="${NGINX_SOCK_DIR}/${USER}-${proto}.sock" | ||
[ -L "${SOCKET_LINK}" ] || \ | ||
ln -s "${XDG_RUNTIME_DIR}/${proto}.sock" "${SOCKET_LINK}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Type Path Mode UID GID Age Argument | ||
d /run/http 0755 root root - - |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the permissions on the socket going to be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, 0700 + the following ACL:
g:nginx:rwx
, and the default daemon should do that, but users can implement whatever they want.Truthfully, arbitrary users being able to send stuff to it wouldn't seem like a big deal, given that the socket is (by nature) exposed to the whole Internet anyhow.