Web Site Administrator Manual

From i3Detroit
Jump to: navigation, search

The site

i3Detroit uses the domains i3detroit.com, i3detroit.org, and i3detroit.net. For the most part, the three domain names are equivalent.

DNS

The three domains are registered with Namecheap. Since 2014-08-25, we have been using Namecheap as authoritative hosting for these domains as well.

@ and www point to the web server. There are a few subdomains specified, including mail and space.

The server

http requests are served from a VM provided by a member. It is located in Southfield, MI. You must request an account on the server to get ssh access for any administrative tasks. It runs a stable version of Debian, and security updates should be regularly applied, after which the VM may be rebooted. Automatic backups of the virtual machine are scheduled and can be restored upon request.

Email

mail.i3detroit.* points to Dreamhost's POP3 and IMAP servers for access to i3detroit-branded email boxes. webmail.i3detroit.* points to Dreamhost's Squirrelmail server.

http

The primary web site is served by nginx with php5-fpm. This has proven to be considerably more efficient than apache.

https

https is an option. It is commented out in the server configuration because we have not settled on the purchase of a properly signed certificate.

  1. TODO Https can be easily implemented for free using LetsEncrypt

Site configuration in nginx

Location blocks in nginx can appear in any order. To decide what to do with a request, nginx looks for the most specific location directive first. For this reason the location / is executed last.

The first server block is to ensure that all the .com or .net URLs still work. This tells Nginx sends your browser a 301 to the correct full URL (so make sure that records for i3detroit.com and i3detroit.net point to our server.).

To keep the site uncluttered, the CRM, wiki, and blog files are stored in separate directories. Please keep it that way to make upgrades easier.

If you need to add a directory to the root of the site, just copy a location block and edit the paths as needed. The fastcgi options can be omitted if it's a static page.

MariaDB server

The backend database for all web sites runs on the same virtual machine, so it is backed up at the same time as the site. The php sites access the server through the unix socket.

Since it is not yet incorporated in the main debian mirror, we've added the mariadb apt mirror.

Use mysqlnd in php to make this work without version mismatch errors

MediaWiki

Pretty standard MediaWiki installation with a few plugins, such as Semantic MediaWiki. Remember to install imagemagick unless you want to configure MW to use GD to generate thumbnails.

A couple tweaks to fix the ridiculously small limits for upload sizes:

/etc/php5/fpm/php.ini

post_max_size = 40M
upload_max_filesize = 40M

/etc/nginx/nginx.conf

http {
   client_max_body_size 100m;
   client_body_timeout 600;
...
}

Seltzer

Our CRM just needs the location of the SQL server in the config file.

Wordpress

Aside from the location of the SQL server, Wordpress is primarily configured through its database. There are probably still some broken paths from the previous installation on Dreamhost. Good luck with that.