Archive for the ‘CentOS 5’ Category

NameVirtualHost + Multiple domain on centos

Thursday, January 5th, 2012
NameVirtualHost + Multiple domain on centos

It’s the example to configure virtual hostings. Following example is done as domain name[topupdeals.com (root directory[/var/www/html])], Virtual domain name[marketing.dvtrust.com (root directory[/home/www/public_html])]. Before doing it, it’s necessarry to add new doman name in your DNS first. [1] Configure httpd for Virtual Hostings [root@www ~]# vi /etc/httpd/conf/httpd.conf # line 972: uncomment NameVirtualHost *:80 # at the last [...]

How To Disable a User Account in Linux Shell

Monday, November 28th, 2011
How To Disable a User Account in Linux Shell

This short howto will show how to disable a user account under linux. This might be useful in the situation where you don’t want to permanently remove the user, but you just want it disabled and no longer able to use the system. The user will still receive emails for example, but he will not [...]

How to fix deprecated pam_stack module error

Saturday, November 12th, 2011

In this article we will see an effective way of fixing the Linux deprecated pam_stack module error for pam.d. If you access your /var/log/secure log file you might notice different services including sshd with the following error: Deprecated pam_stack module called from service “sshd”. The workaround of this is simple Edit /etc/pam.d/sshd Uncomment #auth required [...]

Apache HTTP Virtual Host in Centos

Tuesday, October 11th, 2011

The term Virtual Host refers to the practice of maintaining multiple servers on one machine, each server being defined by it’s hostname (domain).  See the Apache Virtual Host documentation for more information. How to create an Apache HTTP Virtual Host You must first Install and Configure Apache HTTP Server See our Apache HTTP Server documentation Create/Open the file [...]

Implementing PHP File Upload Security on ROOT

Sunday, September 25th, 2011

Most PHP scripts and content management system scripts (CMS scripts) require writable permission 777 (rwxrwzrwz) to be set for certain folders for uploading photos and videos. Many security experts warn that setting 777 permission means that anybody can upload any content to your server, install malicious code, run unwanted programs and could potentially misuse your [...]

How to add / install JSON support to PHP on CentOS

Saturday, August 27th, 2011

We are using staging server inside our organization (CentOS) to test the applications that we work on. We heavily use AMFPHP based PHP services to do communication between business logic and client front end in flash. Team requested to have native JSON support for PHP and I found a very simple way to do it [...]

How to upgrade PHP 5.1.6 to PHP 5.2.6 in CENTOS

Saturday, August 27th, 2011

This guide describes how to upgrade the standard PHP 5.1.x packages in CentOS 5.x 32-bit to the current development versions 5.2.x. These instructions were created using CentOS 5.3 32-bit and with the following PHP packages installed: # rpm -qa |grep php php-common-5.1.6-15.el5.i386 php-cli-5.1.6-15.el5.i386 php-5.1.6-15.el5.i386 php-pdo-5.1.6-15.el5.i386 php-bcmath-5.1.6-15.el5.i386 php-ldap-5.1.6-15.el5.i386 php-devel-5.1.6-15.el5.i386 php-gd-5.1.6-15.el5.i386 php-xml-5.1.6-15.el5.i386 php-mbstring-5.1.6-15.el5.i386 php-mysql-5.1.6-15.el5.i386 php-dba-5.1.6-15.el5.i386 As long [...]