Pages

Thursday, April 25, 2013

You can use mod_rewrite for redirecting http to https.

You can use mod_rewrite for redirecting http to https.
You need to go in the http vhost container and add the following:

========================================

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Or else, you can add the following lines

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

How to recover Plesk password ?

How to recover Plesk password ?

# /usr/local/psa/bin/admin --show-password

SETTING THE NEW PASSWORD USING COMMAND LINE:

# /usr/local/psa/bin/init_conf -u -passwd <new_password>

Adding Linux templates in SolusVM(OpenVZ)

Firstly, login to your server node vis SSH.
The download link for the distros : http://wiki.openvz.org/Download/template/precreated

Perform the following :
#cd /vz/template/cache
#wget http://wiki.openvz.org/Download/template/precreated/centos-5-x86-devel.tar.gz (CentOS 5 as an example)

Then, login to SolusVM and "Add new template". This will add the new distro.