Friday, 28 June 2013

Reset railo password

Reset Railo Server Admin Password:

1. Open the file /opt/railo/lib/railo-server/context/railo-server.xml

2. Look for the line that has "<railo-configuration" and blank out the value of password="".

3.  Restart the railo service

4. When you reload again the railo server admin URL http://IP/railo-context/admin/server.cfm, you can set the new password.

Update Mura version

To update your Mura install to the latest release, follow these steps:

1. Go to Site Settings > Global Settings
   2. Click "Update Core Files to Latest Version"
   3. Wait patiently....there are a LOT of files to update
   4. Go to Site Settings > Edit Current Site and click "Update Site Files to Latest Version" OR manually update the following directories: "/[siteID]/includes/display_objects/formbuilder/" and "/[siteID]/includes/data_collection/index.cfm"

There may be permission issues while doing this step from Mura admin panel. If so set permission 777 to all files that shows issues temporarily until the updation completed and then revert the changes back.
   5. Reload Mura

Enable mod_expire apache module

mod_expire controls the setting of the Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses. These HTTP headers are an instruction to the client about the document's validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source.

Following are the steps to enable  mod_expire in the server.

* Open the file /etc/httpd/conf/httpd.conf and check if the following line present in it.


LoadModule expire_module modules/mod_expire.so
 
If not, add it.
 
* Then  create a new file /etc/httpd/conf.d/expire.conf with the lines:
 
 <IfModule mod_expires.c>
 ExpiresActive On
 ExpiresByType image/jpg "access plus 60 days"
 ExpiresByType image/png "access plus 60 days"
 ExpiresByType image/gif "access plus 60 days"
 ExpiresByType image/jpeg "access plus 60 days"
 ExpiresByType text/css "access plus 1 days"
 ExpiresByType image/x-icon "access plus 1 month"
 ExpiresByType application/pdf "access plus 1 month"
 ExpiresByType audio/x-wav "access plus 1 month"
 ExpiresByType audio/mpeg "access plus 1 month"
 ExpiresByType video/mpeg "access plus 1 month"
 ExpiresByType video/mp4 "access plus 1 month"
 ExpiresByType video/quicktime "access plus 1 month"
 ExpiresByType video/x-ms-wmv "access plus 1 month"
 ExpiresByType application/x-shockwave-flash "access 1 month"
 ExpiresByType text/javascript "access plus 1 week"
 ExpiresByType application/x-javascript "access plus 1 week"
 ExpiresByType application/javascript "access plus 1 week"
</IfModule>
 
* Restart apache service. 

Internal Server Error while access CSF or CSP in WHM

Problem: When you tried to access Config Security Policies  or ConfigServer Security & Firewall in WHM, you may get this error

Internal Server Error

500

No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi): subprocess exited with status 2

Solution: Run the following command after logged in to the server as root

root@server [~]# curl -s configserver.com/free/csupdate | perl


Thursday, 20 June 2013

Reset An Account Password in Plesk

1. Login to Plesk admin panel, https://<IP or domain>:8443

2. Click on 'Domains' option in 'Hosting Services'.

3. Search for the domain you want to change login password. (Let it be example.com)

4. Login to Control Panel of the selected domain.

5. Select Account >> My Profile >> General

6. You can see the account name and an option to change password in 'Panel Preferences' in 'General' tab.

7. Enter a strong password there and Click on OK button to make the changes in effect.

8. Verify user name and password using the given link, https://example.com:8443

Retrieve Plesk admin password on Windows via commandline

You can set up a new password by running the following command:


"%plesk_bin%\plesksrvclient" -set <new_password> true

You can also retrieve the current password by running this utility with:

"%plesk_bin%\plesksrvclient" -get

Wednesday, 19 June 2013

Enable ssh key for cpanel users

Problem: When we need to enable ssh access to the users and if the server is only accessible via key file,

If it is a cpanel server, we can do it simply from WHM/Cpanel

make sure that enabled 'SSH Connection Window'  in the feature manager. Check both default and disabled features.

Enable jailed shell access to the user.

Login to the cpanel of the user. Main >> Security >> SSH/Shell Access >> Manage SSH Keys  >> Generate a new   .  fill the details and generate key. You have to specify a passphrase during the key generation.

Go back and go to Public Keys >> Manage Authorization  and make it as authorized . Download Private Key to your local machine and save it with permission 600. try ssh as given below
ssh -i key user@IP -p port
enter passphrase created during KeyGeneration