Archive for the tag 'website'

How to customize link to Provider’s Website

To customize the URL that opens when the View Services button is clicked:

On Linux systems, issue the following command:

/usr/local/psa/bin/interface_template -p -mpc_portal_url [url]

To remove the View Services button:

On Linux systems, issue the following command:

/usr/local/psa/bin/interface_template -p -extras true

Location of link to Provider’s Website

Server Administration Panel > Tools & Utilities > View Services button.

Reference: http://parallels.net

SBDavid

IonCube PHP Loader Error on website

IonCube PHP Loader Error on website

Site error: the file /home/USER/public_html/index.php requires the ionCube PHP Loader ioncube_loader_lin_X.X.so to be installed.

To Resolve this issue

Create a ‘php.ini’ within the following:

zend_extension = /home/USER/public_html/ioncube/ioncube_loader_lin_4.X.so

Download from : http://www.ioncube.com/loaders.php

Replace USER with the username of the account you are uploading the php.ini file to.

Replace “X” with the appropriate version of the ioncube loader

Upload the php.ini to your public_html directory.

If you are running your script from a directory other than public_html - for example /home/USER/public_html/blog/index.php you will need to upload the php.ini file to that directory.

How to block a specific IP Address from accessing your Website

If you have annoying visitors, site scrapers, or spammers, you may find it useful to block these users from accessing your website content. You can block bad visitors by IP Address (or blocks of IP Addresses) using a .htaccess file. Below are some useful examples.

In the following example, all IP Addresses and domains are accepted, except for xxx.xxx.xxx.xxx and bad-site-example.com.

# allow all except those indicated here
<Files *>
order allow,deny
allow from all
deny from xxx.xxx.xxx.xxx
deny from .*bad-site-example\.com.*
</Files> 

In the following example, all IP addresses are denied access except for xxx.xxx.xxx.xxx and good-site-example.com.

# Deny access to everyone, except those listed here:
<Files *>
order deny,allow
deny from all
allow from xxx.xxx.xxx.xxx
allow from .*good-site-example\.com.*
</Files> 

How to remove a website manually in Ensim Pro Control Panel

Sometimes, the site is not fully removed from the server so it should be deleted manually. Here are all steps that should be done, but please note that after deleting the site can not be restored back.

Everything should be done from under root user.

Check which siteX the site corresponds to:

sitelookup -d domain.com site_handle

and what adminX is responsible for it:

sitelookup -d domain.com wp_user

Let’s say siteX is site handler for the necessary domain, and adminX is the owner.

Remove user content physically from the server:

rm -rf /home/virtual/siteX
rm -f /home/virtual/adminX
rm -f /home/virtual/domain.com
rm -f /etc/httpd/conf/virtual/siteX
rm -rf /etc/httpd/conf/siteX
rm -f /etc/webalizer/domain.com
userdel adminX

And remove the records from the system database:

psql appldb
delete from telnet where site_id = siteX;
delete from apache where site_id =site X;
delete from ssh where site_id = siteX;
delete from users where site_id = siteX;
delete from bandwidth_log where site_id = siteX;
delete from bandwidth_spans where site_id = siteX;
delete from bandwidth where site_id = siteX;
delete from free_uids where site_id = siteX;
delete from diskquota where site_id = siteX;
delete from ipinfo where site_id = siteX;
delete from ipinfo_ipaddrs where site_id = siteX;
delete from ipinfo_nbaddrs where site_id = siteX;
delete from reseller where site_id = siteX;
delete from siteinfo where site_id = siteX;

Finally, you need to go through all the files in /etc/virtualhosting/mappings and check if any of them refer to the site you’re deleting. You can use grep to quickly see if/which files might refer to the site to be deleted:

cd /etc/virtualhosting/mappings
grep -l siteX *

And finally - restart ensim CP:

/etc/init.d/epld stop
/etc/init.d/epld start

Reference and Credit : http://parallels.com/

How to forward a website to another url using PHP

To do this, you need to create the page that will do the forwarding. This can be any page, as long as it ends in “.php”. If you are trying to redirect a domain, you’d create “index.php” inside the public_html directory.

<?php
header(”Location: http://blog.serverbuddies.com”);
?>

Where http://blog.serverbuddies.com is the location that you want the page to forward to.