-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding helper for setting up development environment. Removing all me…
…ntion of cjson.
- Loading branch information
1 parent
a1c7a5b
commit c01b230
Showing
6 changed files
with
78 additions
and
18 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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
master | ||
====== | ||
|
||
* Added dev/test environment setup. | ||
|
||
1.1.0 | ||
====== | ||
|
||
|
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,5 @@ | ||
# Ubuntu 12.04 | ||
|
||
Run `setup.sh` to install all apt requirements, download and build nginx with lua support. All prefixes will match this directory. | ||
|
||
To run nginx, edit `oauth.conf` to use the correct domain and certificates, and then start the server with `sbin/nginx -c oauth.conf`. You should now be able to access the server |
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,27 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
server { | ||
server_name supersecret.net; | ||
listen 443; | ||
|
||
ssl on; | ||
ssl_certificate supersecret_net.pem; | ||
ssl_certificate_key supersecret_net.pem; | ||
|
||
set $ngo_client_id "abc-def.apps.googleusercontent.com"; | ||
set $ngo_client_secret "abcdefg-123-xyz"; | ||
set $ngo_secure_cookies "true"; | ||
set $ngo_token_secret "SuPeRsEcReT"; | ||
|
||
lua_code_cache off; | ||
access_by_lua_file "../access.lua"; | ||
|
||
header_filter_by_lua "ngx.header.content_length = nil"; | ||
body_filter_by_lua_file "../body_filter.lua"; | ||
} | ||
} |
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,35 @@ | ||
#!/bin/sh | ||
|
||
# This has been tested to work on Ubuntu 12.04. YMMV | ||
PACKAGES="libpcre3 libpcre3-dev libssl-dev liblwp-useragent-determined-perl libpam0g-dev lua5.1 liblua5.1-0 liblua5.1-0-dev cmake liblua5.1-sec-dev liblua5.1-json" | ||
echo "Installing lua and supporting packages" | ||
sudo apt-get install $PACKAGES | ||
|
||
mkdir src | ||
cd src | ||
|
||
VERSION="1.6.2" | ||
echo "Downloading nginx $VERSION" | ||
wget "http://nginx.org/download/nginx-$VERSION.tar.gz" | ||
|
||
echo "Downloading ngx_devel_kit" | ||
wget "https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.tar.gz" | ||
mv v0.2.19.tar.gz ngx_devel_kit-0.2.19.tar.gz | ||
|
||
echo "Downloading nginx-lua" | ||
wget "https://github.com/chaoslawful/lua-nginx-module/archive/v0.9.6.tar.gz" | ||
mv v0.9.6.tar.gz nginx-lua-0.9.6.tar.gz | ||
|
||
echo "Untarring" | ||
tar zxf nginx-$VERSION.tar.gz | ||
tar zxf ngx_devel_kit-0.2.19.tar.gz | ||
tar zxf nginx-lua-0.9.6.tar.gz | ||
|
||
echo "Linking libua to /usr/lib/liblua.so" | ||
sudo ln -s `find /usr/lib -iname liblua5.1.so` /usr/lib/liblua.so | ||
|
||
echo "Building nginx" | ||
cd nginx-$VERSION | ||
./configure --add-module=../ngx_devel_kit-0.2.19 --add-module=../lua-nginx-module-0.9.6 --prefix=`readlink -f ../..` --with-http_ssl_module | ||
make install | ||
cd .. |