Tutorial Tag

apache webserver

  1. How To Stress Test An Apache Server Using AB (Apache Benchmark)

    Using a benchmarking tool to test the limits of your apache server will help you prepare for upgrades. Installing AB on CentOS (with cPanel) cPanel adds in an exclusion for all packages named httpd* (any files starting with httpd) to prevent accidentally overwriting apache. SSH into your server. Edit /etc/yum.conf and remove the entry httpd* from the Exclude line vi /etc/yum.conf exclude=bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* Once...
  2. How To Redirect Non-www Traffic To www Using mod_rewrite

    This is an example using the mod_rewrite Apache module to force all traffic to your site to www.yourdomain.com . This can be useful in an SSL context, as well as for SEO purposes. Create a .htaccess file in your webroot (public_html for cPanel servers) and add the following lines: RewriteEngine On RewriteCond %{HTTP_HOST} ^your-domain.com RewriteRule (.*) http://www.your-domain.com/$1 [R=301,L] ...
  3. How To Redirect HTTP Traffic To HTTPS Using An .htaccess File

    The below code when added to an .htaccess file will automatically redirect any traffic destined for http: to https: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] ...
  4. How To Install mod_python For Apache Under cPanel

    To begin, let's grab the latest version of mod_python. We will need to get the SVN version of mod_python as the last previous versioned release has a problem compiling on RHEL5-based systems. Since cPanel servers do not come with Subversion installed by default, we'll need to satisfy that pre-requisite first. Due to cPanel building Perl modules from source, we will be unable to install Subversion via Yum and must do so from...
  5. How To Put Your Site Into Maintenance Mode

    ...
  6. How To Install Apache 2.2.x And PHP 5.3.x On CentOS 5

    This guide assumes you have a minimal CentOS installation and are not planning on running a control panel such as cPanel, which installs the Apache webserver for you. Some of the software versions listed below may need to be changed as they are updated. As of the writing of this article, Apache 2.2.16 and PHP 5.3.3 are the latest versions. Install required packages using Yum yum install bison flex gcc db4 db4-devel libxml2-devel libpng-devel mysql-devel make Download Apache...
  7. How To Compile PHP On CentOS 5 (64Bit) With MySQL Support

    If you try to build PHP 5.x.x on a 64bit CentOS install you may get this error: checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. Looking further into the config.log you will also see: configure:60376: checking for mysql_error in -lmysqlclient configure:60395: gcc -o conftest -I/usr/include -g -O2  -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib  -Wl,-rpath,/usr/kerberos/lib64 -L/usr/kerberos/lib64 -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient ...