forked from mozilla/awsbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'users/proxy/' from commit 'a4b8aa6329e77dee92d8fc2bcbfa7c906d40b…
- Loading branch information
Showing
13 changed files
with
102 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# .bashrc | ||
|
||
# Source global definitions | ||
if [ -f /etc/bashrc ]; then | ||
. /etc/bashrc | ||
fi | ||
|
||
# User specific aliases and functions | ||
export PATH=$PATH:/usr/local/bin:$HOME/node_modules/.bin |
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,12 @@ | ||
/node_modules | ||
/code | ||
/code.old | ||
/config.json | ||
/ver.txt | ||
/.* | ||
!/.bashrc | ||
!/.gitignore | ||
/git | ||
/key.pem | ||
/cert.pem | ||
*~ |
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 @@ | ||
the files for the proxy user's home directory live here. |
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,31 @@ | ||
# serve ver.txt | ||
location /ver.txt { | ||
root /home/app; | ||
} | ||
|
||
# server awbox page | ||
error_page 502 /500/; | ||
location /500/ { | ||
root /home/app/; | ||
} | ||
location /awsbox_background.jpg { | ||
root /home/app/500; | ||
} | ||
|
||
# router | ||
location / { | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-NginX-Proxy true; | ||
|
||
proxy_pass http://127.0.0.1:10000; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
|
||
gzip on; | ||
gzip_disable "MSIE [1-6]\.(?!.*SV1)"; | ||
gzip_proxied any; | ||
gzip_types application/javascript text/css; | ||
} |
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,5 @@ | ||
server { | ||
listen 80; | ||
include /home/proxy/conf.d/server_name.inc; | ||
include /home/proxy/conf.d/common.inc; | ||
} |
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,8 @@ | ||
server { | ||
listen 443 ssl; | ||
# Self-signed certificate. | ||
ssl_certificate /home/proxy/cert.pem; | ||
ssl_certificate_key /home/proxy/key.pem; | ||
include /home/proxy/conf.d/server_name.inc; | ||
include /home/proxy/conf.d/common.inc; | ||
} |
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 @@ | ||
server_name ""; |
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,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
openssl genrsa -out key.pem 2048 | ||
openssl req -new -config request.cnf -x509 -key key.pem -out cert.pem -days 1095 | ||
|
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,10 @@ | ||
{ | ||
"name": "awsbox-proxy", | ||
"version": "0.0.1", | ||
"private": true, | ||
"dependencies": { | ||
"connect": "2", | ||
"http-proxy": "0.10.3", | ||
"forever": "0.10.8" | ||
} | ||
} |
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,14 @@ | ||
[ req ] | ||
default_bits = 2048 | ||
default_keyfile = key.pem | ||
distinguished_name = AWSBOX deployment | ||
prompt = no | ||
|
||
[ AWSBOX deployment ] | ||
C = US | ||
ST = Test State or Province | ||
L = Test Locality | ||
O = Organization Name | ||
OU = Organizational Unit Name | ||
CN = awsbox.tld | ||
emailAddress = [email protected] |
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 @@ | ||
* | ||
!.gitignore |
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 @@ | ||
* | ||
!.gitignore |
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 @@ | ||
* | ||
!.gitignore |