Introduction
This will show you the steps needed to create a custom startup file for ea-nodejs which overrides the default name of "app.js" which Passenger searches for.
Procedure
When you register an app with the Application Manager, a file is created in the following location: (Be sure to replace "$USER" and "$DOMAIN" with the appropriate cPanel username and domain name, and $APPLICATION will match the name set in the Application Manager):
/etc/apache2/conf.d/userdata/std/2_4/$USER/$DOMAIN/$APPLICATION.conf
Modify this file, and add an entry for "PassengerStartupFile" with the name of the custom file you would like to utilize:
PassengerStartupFile index.js
If you plan to use HTTPS with this application, ensure the file is updated there:
mkdir -p /etc/apache2/conf.d/userdata/ssl/2_4/$USER/$DOMAIN/
cp -v /etc/apache2/conf.d/userdata/std/2_4/$USER/$DOMAIN/$APPLICATION.conf /etc/apache2/conf.d/userdata/ssl/2_4/$USER/$DOMAIN/$APPLICATION.conf
Then rebuild the Apache configuration and restart Apache:
/scripts/rebuildhttpdconf && /scripts/restartsrv_httpd
Comments
0 comments
Article is closed for comments.