(or, how to make your USB-enabled router (mine is ASUS) into a web-server on the free and cheap)
//Set up flash drive correctly onto /opt directory. Get ipkg somehow ipkg install coreutils //gives you things like chown ipkg install php-fcgi nginx php-gd ...etc ipkg files nginx //shows you where key nginx files are located
location / { root html; index index.html index.htm index.php doku.php; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME /opt/share/nginx/html/$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } #prevents external access to dokuwiki data files that aren't php location ~ /(data|conf|bin|inc)/ { deny all; }
iptables -t filter -I INPUT -p tcp —dport 80 -j ACCEPT
//PHP's UID and GID seem to be 33 (www-data) <http://www.dokuwiki.org/install:permissions> nhergert@Lazarus:~$ sudo chown -R nhergert:www-data /home/nhergert/ServerBackup/ nhergert@Lazarus:~$ sudo chmod -R 775 /home/nhergert/ServerBackup/
Re: HOWTO: Setup Ubuntu as a wireless router Some suggestions:
Instead of manipulating iptables directly, consider using shorewall (http://shorewall.net) it makes configuring iptables much easier and also enables creating “trusted” and “untrusted” zones pretty easily. Also doing NAT/masquerade and port forwarding is also easy.
Second, instead of installing a dhcp server, consider using the dnsmasq package. It's both a DHCP server and a DNS cache and works rather nicely on my Ubuntu software router (I notice you put it in the future plans, though).
For easy web administration, I use webmin (http://webmin.com). It's not in the Ubuntu repository but you can find a binary package on their web page. You can configure a lot of settings like that, including shorewall.
Uses flat files, not MySQL
like lighttpd, php, etc