Archive for the tag 'Application'

SBDavid

How to deploy a .WAR application

How to deploy a .WAR application

Upload the .WAR archive to /public_html/servlet
Extract .WAR archive using Shell access using the unzip command (See How to access SSH if you need help)

Example:

# unzip example.war
Archive: example.war
creating: META-INF/
inflating: META-INF/MANIFEST.MF
inflating: helloworld.jsp
creating: WEB-INF/
inflating: WEB-INF/web.xml
inflating: index.html

The system scans the appBase for WAR files at 5 minute intervals.
There is a specific structure that Java web archives must have and it will not work if it does not.

How do I enable error logging for PHP scripts which helps in debugging application?

PHP errors are by default logged to the web server’s error log file (at least they are with the default setup on most Linux distros) but it is also possible to instead log PHP errors to a file of your choice. This is useful on production websites so you can periodically check for errors and fix them in a location other than the default webserver error log file.

If you do not currently have a php.ini, make one and place it in the same folder(s) as the PHP script(s) that you want to track errors for. You will need to add the following 2 lines:

log_errors = On
error_log = error_log

If we choose to enable error logging, then we MUST check the error_log often and take corrective actions for persistent errors, it’s recommend having it disabled for security reasons.

Creating a Rewrite for Ruby on Rails Application in cPanel

Ruby on Rails uses its own server, users visiting your Ruby on Rails application will need to be redirected to the appropriate port.

Because Ruby on Rails uses its own server, users visiting your website (and subsequently your Ruby on Rails application) will need to be redirected to the appropriate port.
Ruby does not respond on the standard HTTP port number, 80. Thus, visitors would need to specify the port number with the domain — for example, example.com:12001.

To configure a rewrite for Ruby on Rails Application in cPanel
1. Log into cPanel.
2. Navigate to the Software/Services section of your cPanel interface.
3. Click the Ruby on Rails icon. This step will open the Ruby on Rails management interface.
4. Click the Create Rewrite button corresponding to the appropriate application in the Create A Rewrite table.

Creating a Ruby on Rails Application in Cpanel Server

Ruby on Rails runs on its own server so the setup requires a little extra work.

1. Log into cPanel.
2. Navigate to the Software/Services section of your cPanel interface.
3. Click the Ruby on Rails icon.
* This step will open the Ruby on Rails management interface.
4. Specify your application’s name in the App Name field.
* PICK Remember: To set your application to load when the server is booted, click the Load on Boot? check box.
5. Assign the application path in the Application Path field.
* note Note: If you set an application path in your public_html/ directory, your source code and configuration files can be viewed by anyone on the web.
6. Use the Environment drop-down menu to select the type of Ruby on Rails environment you wish to run.
7. Click Create.