summaryrefslogtreecommitdiffstats
path: root/software
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2010-06-07 01:15:41 -0400
committerbnewbold <bnewbold@robocracy.org>2010-06-07 01:15:41 -0400
commitd1b51dc84b63db37598a4c392e2bc5512735a6c4 (patch)
tree8b0d7b4cf549fdd395525e39b4e6c3ef5b39e172 /software
parent93ec9c6c8e94dca389a345b323ffef97edf15af4 (diff)
downloadknowledge-d1b51dc84b63db37598a4c392e2bc5512735a6c4.tar.gz
knowledge-d1b51dc84b63db37598a4c392e2bc5512735a6c4.zip
more servery goodness
Diffstat (limited to 'software')
-rw-r--r--software/server-setup.page40
1 files changed, 28 insertions, 12 deletions
diff --git a/software/server-setup.page b/software/server-setup.page
index 0eb03eb..a436e10 100644
--- a/software/server-setup.page
+++ b/software/server-setup.page
@@ -7,6 +7,19 @@ toc: no
Generic Server Setup Tricks
=========================================
+hostname
+-------------
+On Linux (at least ubuntu), the correct way to set a FQDN (fully qualified
+domain name, eg killer.mail.webtwo.com; the hostname in this case would be
+killer) is to edit both ``/etc/hosts``::
+
+ <primary ip> <fqdn> <hostname>
+ 127.0.0.1 localhost
+
+and ``/etc/hostname``::
+
+ <hostname>
+
See also `debian </software/debian>`_ and
`freebsd tricks </software/freebsd-tricks>`_.
@@ -37,27 +50,29 @@ File Hierarchy
Root for server files, scripts, and databases
/srv/http/
- Subdirectories for each virtual host live in this folder, out of which
- static `HTTP </k/software/http>`__ content is served.
+ Subdirectories for each virtual host live in this folder, with further
+ subdirectories for different dynamic services or static serving. /www/
+ is for static html content.
-/srv/django/
- Django applications and their databases live in here.
+/srv/http/default/www/
+ Default pages like 404.html or 50x.html live here.
/srv/git/
Bare git repositories are stored here; those with a file
``git-daemon-export-ok`` get served up through a web interface and can be
publically cloned.
-/srv/
- SVN repository roots are stored in sub folder in here.
+/srv/backup/
+ Database dumps and backups get put in subdirectories here; this whole
+ directory can be rsynced to a remote location.
-/srv/python/
- Standalone python scripts and applications are stored in here (not Django
- apps).
+/srv/db/
+ Database files (sqlite, passwds, etc) go in subdirectories here. Usually
+ has crazy r/w permissions!
-Ruby on Rails Deployment
-------------------------------
-This method will mess around with nginx. It uses `<http://www.modrails.com>
+Ruby on Rails Deployment: Phusion Passenger
+-----------------------------------------------
+This method replaces the nginx binary. It uses `<http://www.modrails.com>
Phusion Passenger`_ on Ubuntu Server::
nano /etc/apt/sources.list # uncomment the 'universes' lines
@@ -66,3 +81,4 @@ Phusion Passenger`_ on Ubuntu Server::
sudo aptitude install irb1.8 bzip2 unzip less screen wget curl sysinfo # Optional
sudo gem install passenger
sudo /var/lib/gems/1.8/bin/passenger-install-nginx-module
+