Article by Aashish
# yum install httpd* mysql* -y
*** Install Module Needed for Authentication from MySQL databases. ***
# yum install mod_auth_mysql -y
*** Create a database which contains a table holding the username and passwd ***
#mysql -u root -p
password:
mysql> create database httpd;
mysql> use httpd;
mysql> create user ‘apache’@'localhost’ identified by ‘apache’;
mysql> create table users( user_name char(30) NOT NULL, user_passwd char(30), user_group char(30)
NOT NULL, PRIMARY KEY(user_name));
mysql> grant all privileges on *.* to ‘apache’@'localhost’ with GRANT option;
mysql> INSERT INTO users VALUES (’testuser’, ENCRYPT(’testpass’), ‘user’);
mysql> INSERT INTO users VALUES (’admin’, ENCRYPT(’testpass’), ‘group’);
mysql> quit
# service mysqld restart
# vim /etc/httpd/conf/httpd.conf
AuthName “MySQL group authenticated zone”
AuthType Basic
AuthMYSQLEnable on
AuthMySQLUser apache
AuthMySQLPassword apache
AuthMySQLDB httpd
AuthMySQLUserTable users
AuthMySQLNameField user_name
AuthMySQLPasswordField user_passwd
AuthMySQLGroupField user_group
require group admin /or/ require valid-user
# service httpd restart
enjoy
Article by Aashish
This howto will show you howto store your users in LDAP and authenticate some of the services against it. I will not show howto install particular packages, as it is distribution/system dependant. I will focus on “pure” configuration of all componenets needed to have LDAP authentication/storage of users. The howto assumes somehow, that you are migrating from a regular passwd/shadow authentication, but it is also suitable for people who do it from scratch.
In: Bushan| Linux| MySQL| Replication
4 Mar 2010via Bhushan
TYPES OF MYSQL REPLICATION
Statement-based Replication
Row-based Replication
Mixed
To change the type of Replication modify my.cnf configuration file and change
binlog_format=mixed | row | statement
Article by Aashish
keepalived provides a strong and robust health checking for LVS clusters. It nginx implements a framework of health checking on multiple layers for server failover, and VRRPv2 stack to handle director failover. How do I install and configure Keepalived for reverse proxy server such as nginx or lighttpd?
Article by Aashish
This article explains the process that will allow you to recover a lost MySQL password:
Stop the MySQL server process
Start the MySQL (mysqld) server/daemon process with the
–skip-grant-tables option so that it will not prompt for password.
Article by Aashish
How do I redirect 80 port to 8123 using iptables?
You can easily redirect incoming traffic by inserting rules into PREROUTING chain of the nat table. You can set destination port using the REDIRECT target.
Article by Aashish
Apache Performance Modules
Apache is a powerful and widely-used World-Wide Web (Web) server. One of its strengths is that the modules that it is made of are customizable according to the user’s requirements. Ashish Kumar discusses the benefits and the process of customization, along with a brief introduction to some useful modules.
In: Aashish| Linux| Monitoring| Security| TCP/IP| iptables| ubuntu
18 Feb 2010Article by Aashish
How do I restrict the number of connections used by a single IP address to my server for port 80 and 25 using iptables?
You need to use the connection limit modules which allows you to restrict the number of parallel TCP connections to a server per client IP address (or address block). This is useful to protect your server or vps box against flooding, spamming or content scraping.
Article by Khaled
Openvpn is an open source software, allows us to create a Virtual Private Network.
In: Aashish
16 Feb 2010Article by Aashish
Storage resource located on an iSCSI server known as a “target”. An iSCSI target usually represents nothing but hard disk storage. As with initiators, software to provide an iSCSI target is available for most mainstream operating systems.