Permalink
Browse files

nginx now captive portals by redirecting corectly

updates to mediaserver readme for router setup
  • Loading branch information...
1 parent 19b506c commit 7a630e91f2cffa942dddc02d9806f45bb40be71c @calaldees committed Mar 2, 2014
Showing with 39 additions and 3 deletions.
  1. +31 −0 mediaserver/README.rst
  2. +8 −3 mediaserver/nginx.conf
@@ -25,3 +25,34 @@ Running the server
~~~~~~~~~~~~~~~~~~
- `make run` to run the server
- Ctrl-C to stop it
+
+
+
+Router Setup
+~~~~~~~~~~~~
+
+Netgear routers
+ 172.20.1.1
+ channel 1
+ points to 172.20.1.2 for dhcp
+ 172.20.1.2 reserved for ethernet mac address
+ subnet mask of 255.255.0.0
+ 172.20.12.1 -
+
+Wireless
+ SSID: Karakara
+ b & g
+ no encryption
+ primary dns: 172.20.1.2
+LAN
+ DCHP off
+ subnet 255.255.0.0
+ set range dchp range to off but include 172.20.x.3 > 254
+
+Ubuntu ethernet setup
+ do not automaticall connect
+ Manual 172.20.1.2 subnet 255.255.0.0 gateway 0.0.0.0
+ Require ipv4 to complete + route + use this connetion for resorces on this network only
+
+Old satilte laptop
+172.20.1.2 ALLAN-SATELLITE-PRO-L300D 00:1E:33:C0:4C:D2
@@ -130,9 +130,9 @@ http {
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
#gzip_proxied no-etag;
- server {
- #rewrite /.* http://int.karakara.local/; # Only to be used with dnsmasque and a correct network setup
- }
+ #server {
+ # rewrite ^ http://int.karakara.local/ redirect; # Only to be used with dnsmasque and a correct network setup
+ #}
server {
listen 80 default;
@@ -145,6 +145,10 @@ http {
server_name int.karakara.local;
+ if ($host !~* int.karakara.local){
+ rewrite ^(.*)$ http://int.karakara.local/ redirect;
+ }
+
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
@@ -154,6 +158,7 @@ http {
#allow 127.0.0.1;
#deny all;
expires 12h;
+ gzip off;
}
# location ~ /files/.*/thumbnail/*.jpg {
# allow 127.0.0.1;

0 comments on commit 7a630e9

Please sign in to comment.