Running Discourse

Discourse is a popular forum software written in Ruby. Because Discourse relies on Docker, which is incompatible with the platform, installation must be carried out manually. A Pro package is recommended to run Discourse as each worker is approximately 200 MB. Getting Started Installation is done within the Terminal. Checkout the Discourse repository from GitHub…

Scripting with Beacon

Beacon is a scripting companion to apnscp that provides a simple interface to interacting with more than 2,000 commands exposed in apnscp. If apnscp can do it so can you, minus a pretty interface of course! Beacon may also be downloaded from our github repo. Getting Started Beacon requires an API key for authentication. Visit Dev >…

Working with Laravel config:cache

Laravel provides a static cache utility via Artisan to collapse configuration under config/ into a single file to boost performance. Configuration may be cached using: php artisan config:cache When run from terminal, the paths provided may be incorrectly referenced when the application is accessed from the web resulting in application errors. Solution Overwrite bootstrap/app.php to use a…

Mail sent via 127.0.0.1 rejects with “Relaying Denied”

Overview Email that is sent over TCP via 127.0.0.1 or the server IP address is rejected with a “521: Relaying Denied” error message. Cause All email that passes through TCP must be authenticated with a SASL-compatible username and password, which is the login/password used to access email on the server. Solution SASL authentication is necessary to…

Passenger applications do not inherit htaccess rules

Overview .htaccess files are used to control behaviors of applications by overriding global server configuration. Any Passenger-based application, which includes Node, Python, and Ruby, will stop processing rules beyond the document root, often noted by convention as public/. Cause Passenger is managed by a separate facility that immediately takes control of the request once Apache detects that the…

Passenger-backed apps perform unscripted optimizations

Overview Applications launched through Passenger, which includes Node, Python, Ruby, and Meteor, may receive optimizations to JavaScript, CSS, and image assets which are not explicitly defined within application logic. Take for example a small external JavaScript asset that may become inlined after the first request: <head> <script src=”//test.js””></script> <!– rest of head –> becomes: <head> <script>//<![CDATA[ console.log(“Hello 212a.”);…

Changing Node Versions

Overview Platforms v6.5+ and beyond support multiple Node versions that may be installed using nvm. Usage Listing nvm is provided automatically. First, to list available node interpreters, execute nvm ls from the terminal: $ nvm ls v4.2.4 v5.5.0 -> system node -> stable (-> v5.5.0) (default) stable -> 5.5 (-> v5.5.0) (default) iojs -> N/A (default)…

Elevating privileges with sudo

Overview Newer platforms, v6+, provide limited sudo support that allows you to remove, copy, and change ownership of files with elevated permissions (root). Depending upon the platform version, either  rm (v6) or rm, cp, and chown (v6.5+) commands are available. Usage sudo follows a general syntax: sudo command arguments. Certain commands have restrictions on what arguments…