Difference between revisions of "Database/Map/Server"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| Line 36: | Line 36: | ||
iface eth0 inet static  | iface eth0 inet static  | ||
address 10.1.2.1  | address 10.1.2.1  | ||
| + | netmask 255.255.255.0  | ||
| + | |||
| + | iface wlan0 inet static  | ||
| + | address 10.1.2.2  | ||
netmask 255.255.255.0  | netmask 255.255.255.0  | ||
</nowiki>  | </nowiki>  | ||
| Line 43: | Line 47: | ||
address=/#/10.1.2.1  | address=/#/10.1.2.1  | ||
interface=eth0  | interface=eth0  | ||
| − | dhcp-range=10.1.2.  | + | dhcp-range=10.1.2.5,12h  | 
</nowiki>  | </nowiki>  | ||
# restart dnsmasq  | # restart dnsmasq  | ||
| Line 63: | Line 67: | ||
Remember to make all /var/www/ folders readable with:    | Remember to make all /var/www/ folders readable with:    | ||
| − | <  | + |  <nowiki>  | 
| + | sudo find /var/www -type d -exec chmod a+x {} +</nowiki>  | ||
and possibly  | and possibly  | ||
| − | <  | + |  <nowiki>  | 
| + | sudo find /var/www -type d -exec chown  {} root:root +</nowiki>  | ||
== For Online ==    | == For Online ==    | ||
Revision as of 06:08, 23 March 2015
Client Side
extract the location client-side with EXIF-JS
RPi side
Lets set up our map server with local cached image files
sudo apt-get update sudo apt-get install nginx sudo service nginx start
- Make a link to /var/www to make things easier
 
sudo ln -s /var/www /home/USER/code
(# now set up PHP with fastCGI) (# set up mapserv) (# add mapserv to cache)
(# captive portal setup!!) (# but with iptables command from here, since the others are broken)
- Set up interface for serving DHCP and DNS
 
auto eth0 iface eth0 inet static address 10.1.2.1 netmask 255.255.255.0 iface wlan0 inet static address 10.1.2.2 netmask 255.255.255.0
- Install dnsmasq "sudo apt-get install dnsmasq" and configure
 
# captive portal to this address=/#/10.1.2.1 interface=eth0 dhcp-range=10.1.2.5,12h
- restart dnsmasq
 
sudo /etc/init.d/dnsmasq restart
- dnsmarsq script logging...
 
ended up using dnsmasq for DNS and DHCP. Setting DNS forward IP to local for captive portal setup
/var/www
Remember to make all /var/www/ folders readable with:
sudo find /var/www -type d -exec chmod a+x {} +
and possibly
sudo find /var/www -type d -exec chown  {} root:root +