Archive for the ‘Unix/Linux Various’ Category

/tmp & /var/tmp noexec hardening without reboot

Saturday, November 28th, 2009

After discovering scripts running in my /tmp folder (in CentOS 5.x) I had to harden the directory.

The faster way to harden your /tmp and /var/tmp without rebooting is the following:

In your /dev directory create an empty 2,5 GB file (best for web hosting servers with many websites).

# cd /dev
# dd if=/dev/zero of=tmppart bs=1024 count=2500000

We will now create an ext3 filesystem for in our tmppart file.
(more…)

Plesk 9.x – SSL Error , certificate is for localhost.localdomain

Sunday, May 17th, 2009

When you install a certificate in a Plesk 9.x version you and try to check if ti works in the browser you might get a strange problem , the appearing SSL in the browser would be issued for localhost.localdomain (the default certificate that comes with the OS for example CentOS). (more…)

Show Full Path in Shell (bash)

Tuesday, July 8th, 2008

Lets say you have to navigate to a long directory like /var/www/vhosts/mydomain.tld/httpdocs/myfolder/ etc

even if you give the command “cd /var/www/vhosts/mydomain.tld/httpdocs/myfolder/” at your shell window you will see only your username and the last folder , something like “root /myfolder#” in order you view the full path without having to use the pwd command every time, (more…)

How do I setup all subdomains *.domain.tld to point to a domain domain.tld? | wildcard dns in plesk

Tuesday, July 8th, 2008

For that purpose you should add an entry into domain’s zone DNS  like:

(more…)

Linux Plesk how to add www to a subdomain

Tuesday, July 8th, 2008

To create www prefix for subdomains you need to take the following steps:

1) Create vhost.conf file in the
/home/httpd/vhosts/domain.com/subdomains/subdomain/conf
directory with the following content:

ServerAlias www.subdomain.domain.com

2) Add appropriate A record to the DNS zone of the domain in
Server->Domains->domain.com->DNS

(specify this domain’s IP address instead of 192.168.1.1):

www.subdomain.domain.com.          A     192.168.1.1

3) Run wersrvmng utility to apply changes.

# /usr/local/psa/admin/sbin/websrvmng -v -a

Zend Optimizer error : Failed loading /usr/local/Zend/lib/ZendExtensionManager.so

Tuesday, July 8th, 2008

After Zend Optimizer installation you get the following error:

Failed loading /usr/local/Zend/lib/ZendExtensionManager.so:
/usr/local/Zend/lib/ZendExtensionManager.so: failed to map segment from shared object: Permission denied

this is because of (more…)