admin has written 156 articles

Using WSGI

Overview Python applications can be launched using Passenger offering improved throughput and lifecycle management. Launching CGI scripts wrapped by pyenv will yield very poor throughput as a result of multiple shell subprocesses necessary to ascertain the correct Python interpreter. Adapting a CGI application to WSGI improves throughput significantly by reducing overhead through a persistent process. Pages load quickly, and applications utilize…

Restarting Passenger processes

Overview An application launched by Passenger may be restarted by creating a file in tmp/ (NB: not /tmp) within the application root directory, usually one level down from public/. Create a file under tmp/ named restart.txt to restart the application once. A restart will happen within 2 minutes. To restart an application on every request, very useful for…

Using multiple versions with Passenger

Overview Passenger provides an intelligent polyglot launcher interface for managing Node.js, Ruby, and Python processes. This can be teamed up with pyenv to effortlessly launch multiple Python applications with a single shell command and .htaccess directive. These steps are only necessary to use supplementary Python versions available on the server. If the default version works…

Changing Python versions

Overview Recent platforms (v6+) support multiple Python interpreters from the shell using pyenv. pyenv allows seamless switching between available Python versions, and manages version-specific package installations too. Basics All commands are done from the terminal. Listing versions To get a current list of available Python interpreters, use pyenv versions: [myadmin@sol ~]$ pyenv versions system 2.7.8 * 3.3.5…

Mail sent to a hosted domain does not arrive if third-party MX records are present

Overview Mail sent to a domain hosted by your account that uses third-party MX records does not arrive to the intended recipient. Mail is instead delivered locally to the server that hosts your domain. For example, if example.com uses Google Apps to handle e-mail, and mail originates from the same hosting server as in from a script, like a…

Installing WordPress

Overview WordPress is a popular content-publication software that can do everything from run a simple four-page web site to an eCommerce shop. Even our knowledgebase is run with WordPress, a few plugins, and a theme. Installing WordPress One-Click Method As of May 10, 2016 one-clicks have returned to the control panel. To update within the control panel:…

Creating a database

Overview Additional MySQL databases, used for storing application data, may be created quickly within the control panel via Databases > MySQL Manager. When a database is created, grants are automatically setup to permit the primary user access to the database. In multi-user environments, you may wish to create a separate user to keep your master password confidential.…

Adding pretty-print URLs

Overview Pretty-print URLs (permalinks) in WordPress transform meaningless URL patterns, e.g. index.php?page_id=123 into meaningful URLs, like /wordpress/adding-pretty-print-urls. Navigation is easier to view in the browser, plus it helps with SEO. Enabling pretty-print is a two-part process, add a few lines to your .htaccess and configure the display style in WordPress. Solution Create a .htaccess file inside the document root for your…