4 changed files with 168 additions and 4 deletions
Unified View
Diff Options
-
32srv/conf/conf.d/portal.conf
-
84srv/conf/dnsmasq.conf
-
32srv/conf/nginx.conf
-
24srv/docker-compose.yml
@ -0,0 +1,32 @@ |
|||||
|
server { |
||||
|
server_name captive.eca.aero |
||||
|
*.apple.com |
||||
|
*.google.com |
||||
|
*.gstatic.com; |
||||
|
|
||||
|
location / { |
||||
|
proxy_pass http://portal_service:8889/; |
||||
|
proxy_set_header Host $host; |
||||
|
proxy_set_header X-Real-Ip $remote_addr; |
||||
|
proxy_buffering off; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
server { |
||||
|
listen 80 default_server; |
||||
|
server_name _ eca.aero; |
||||
|
root /data/webapp/default; |
||||
|
} |
||||
|
|
||||
|
#server { |
||||
|
# listen 80 default_server; |
||||
|
# listen 443 default_server; |
||||
|
# server_name _; |
||||
|
# return 302 http://eca.aero$request_uri; |
||||
|
#} |
||||
|
|
||||
|
server { |
||||
|
server_name portal.eca.aero; |
||||
|
root /data/webapp/portal; |
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
# Configuration file for dnsmasq. |
||||
|
# |
||||
|
# Format is one option per line, legal options are the same |
||||
|
# as the long options legal on the command line. See |
||||
|
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. |
||||
|
|
||||
|
|
||||
|
|
||||
|
# Configuration file for dnsmasq. |
||||
|
# |
||||
|
# Format is one option per line, legal options are the same |
||||
|
# as the long options legal on the command line. See |
||||
|
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. |
||||
|
|
||||
|
# If you want dnsmasq to listen for DHCP and DNS requests only on |
||||
|
# specified interfaces (and the loopback) give the name of the |
||||
|
# interface (eg eth0) here. |
||||
|
# Repeat the line for more than one interface. |
||||
|
# interface=ienx9cebe834212c |
||||
|
|
||||
|
except-interface=lo |
||||
|
|
||||
|
#bind-dynamic |
||||
|
bind-interfaces |
||||
|
|
||||
|
######### dns ######## |
||||
|
# Never forward plain names (without a dot or domain part) |
||||
|
domain-needed |
||||
|
# Never forward addresses in the non-routed address spaces |
||||
|
bogus-priv |
||||
|
# dont read resolv.conf use the defined servers instead |
||||
|
no-resolv |
||||
|
server=8.8.8.8 |
||||
|
server=8.8.4.4 |
||||
|
# increase dns cache form 512 to 4096 |
||||
|
cache-size=4096 |
||||
|
# Add domains which you want to force to an IP address here. |
||||
|
address=/ife.aero/192.168.0.2 |
||||
|
address=/.ife.aero/192.168.0.2 |
||||
|
address=/pxcom.aero/192.168.0.2 |
||||
|
address=/.pxcom.aero/192.168.0.2 |
||||
|
|
||||
|
address=/google.com/192.168.0.2 |
||||
|
address=/.google.com/192.168.0.2 |
||||
|
address=/gstatic.com/192.168.0.2 |
||||
|
address=/.gstatic.com/192.168.0.2 |
||||
|
address=/apple.com/192.168.0.2 |
||||
|
address=/.apple.com/192.168.0.2 |
||||
|
address=/eca.aero/192.168.0.2 |
||||
|
address=/.eca.aero/192.168.0.2 |
||||
|
|
||||
|
address=/#/192.168.0.2 |
||||
|
|
||||
|
######### dhcp ########## |
||||
|
# Add local-only domains here, queries in these domains are answered |
||||
|
# from /etc/hosts or DHCP only |
||||
|
local=/aero/ |
||||
|
# Set this (and domain: see below) if you want to have a domain |
||||
|
# automatically added to simple names in a hosts-file. |
||||
|
#expand-hosts |
||||
|
# adds my localdomain to each dhcp host |
||||
|
domain=eca.aero |
||||
|
# my private dhcp range + subnetmask + 14d lease time |
||||
|
dhcp-range=192.168.0.10,192.168.0.200,255.255.255.0,14d |
||||
|
dhcp-option-force=160,"http://portal.eca.aero" |
||||
|
# set route to my local network router |
||||
|
#dhcp-option=option:router,192.168.178.1 |
||||
|
#windows 7 float fix |
||||
|
#http://brielle.sosdg.org/archives/522-Windows-7-flooding-DHCP-server-with-DHCPINFORM-messages.html |
||||
|
dhcp-option=252,"\n" |
||||
|
|
||||
|
###### logging ############ |
||||
|
# own logfile |
||||
|
log-facility=/var/log/dnsmasq.log |
||||
|
log-async |
||||
|
# log dhcp infos |
||||
|
log-dhcp |
||||
|
# debugging dns |
||||
|
log-queries |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
@ -0,0 +1,32 @@ |
|||||
|
user nginx; |
||||
|
worker_processes 1; |
||||
|
|
||||
|
error_log /var/log/nginx/error.log warn; |
||||
|
pid /var/run/nginx.pid; |
||||
|
|
||||
|
|
||||
|
events { |
||||
|
worker_connections 1024; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
http { |
||||
|
include /etc/nginx/mime.types; |
||||
|
default_type application/octet-stream; |
||||
|
|
||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
||||
|
'$status $body_bytes_sent "$http_referer" ' |
||||
|
'"$http_user_agent" "$http_x_forwarded_for"'; |
||||
|
|
||||
|
access_log /var/log/nginx/access.log main; |
||||
|
|
||||
|
sendfile on; |
||||
|
#tcp_nopush on; |
||||
|
|
||||
|
keepalive_timeout 65; |
||||
|
|
||||
|
#gzip on; |
||||
|
|
||||
|
include /etc/nginx/conf.d/*.conf; |
||||
|
} |
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save