Difference between revisions of "Server"

From Kandos Digital Embassy
Jump to: navigation, search
Line 57: Line 57:
 
</nowiki>
 
</nowiki>
 
# turn all the caching on!
 
# turn all the caching on!
 +
# Make sensor data folder writable " sudo chmod a+w /var/www/data/sensors/images/"

Revision as of 08:39, 2 April 2015

Node connected to it

  1. Use broadcast flag true
  2. Set WAN to DHCP client


Setup

  1. set up debian web server (Nginx PHP mysql)
  2. add php5-cli (sudo apt-get install php5-cli)
  3. install dnsmasq for ETH0
  4. set dnsmasq config for just ETH0, just DNS
  5. set interfaces to static ETH0 192.168.1.1
  6. dnsmasq config
<no wiki>

domain-needed bogus-priv no-hosts expand-hosts domain=mesh.local interface=eth0 address=/#/192.168.1.1 dhcp-range=192.168.1.10,192.168.1.150, 12h </nowiki>

  1. Enlarge nginx upload limit: sudo nano /etc/nginx/nginx.conf

Add the following to http or server or location context:

# set client body size to 4M #
client_max_body_size 4M;

  1. Copy Dolphin install over to pi
  2. remove stupid Mac OSX Resource Fork files
sudo find /var/www/ -name "._*" -exec rm {} \;

  1. follow these to install dolphin on nginx
  2. make index.php index too
  3. add digitalembassy.mesh to /etc/hosts if you want to see it locally
  4. do dolphin install
  5. do database update
  6. update time and timezone
 
sudo date -s "5 APR 2015 11:00:00"
sudo cp /etc/share/zoneinfo/Australia/Sydney /etc/localtime 

  1. nginx config to redirect to index:
error_page 404 /index.html;

  1. Make sure language files are writable
sudo find /var/www/ -type f -name "lang-en.php" -exec chmod 666 {} \;

  1. Then modify language string for _sys_request_page_not...
Page was not found<script>window.location='/'</script>

  1. turn all the caching on!
  2. Make sensor data folder writable " sudo chmod a+w /var/www/data/sensors/images/"