Introduction
On our N0C servers, we use Passenger to run your Node.js, Ruby and Python applications. When an error occurs in an application using one of these programming languages, a page like the one below will be displayed:
This page is not very explanatory. Activating the development mode will allow further investigation and find the cause of the problem. The detailed error display simplifies the analysis and correction of the problem.
Activation of the Development Mode
In order to activate the development mode, you must modify the .htaccess file linked to your application. Warning: the folder containing the .htaccess file is not the same as the one containing the source files of the application.
- You can find the folder that contains the .htaccess of the application by going to the “File Manager” option of your N0C panel. On this page, you will be able to find all your domains as well as the root of the document linked to this domain (how).
- Once you have found the .htaccess file, you will be able to modify this file by editing it via the N0C file manager (how) and via FTP (how).
- You will find a section in the comments entitled “# DO NOT REMOVE. CLOUDLINUX PASSENGER CONFIGURATION”. You should not modify the content between these lines. It is after this section that you will have to add the code necessary to activate the development mode. Here is the code to add:
# DO NOT REMOVE. CLOUDLINUX PASSENGER CONFIGURATION BEGIN ... # DO NOT REMOVE. CLOUDLINUX PASSENGER CONFIGURATION END PassengerFriendlyErrorPages on PassengerAppEnv development
- Once the development mode is activated, a detailed error page will be displayed and will allow you to know the error.