Tagged: apache RSS

  • levin 5:04 pm on May 24, 2010 Permalink | Reply
    Tags: apache   

    Apache Web Load Balancing howto 

    Setup Overview

    A apache load balancer http://www.mydomain.com setup for redirect incoming request to two underlying web server www1.mydomain.com, www2.mydomain.com.

    Hosts

    Host#1 www1.mydomain.com: 192.168.1.1
    Host#2 www2.mydomain.com: 192.168.1.2
    The apache load balancer instance http://www.mydomain.com running on RedHat Cluster floating IP 192.168.1.3 or you can activate it on either one server using IP alias without using Cluster Suit.

    Load balancer setup http://www.mydomain.com

    Parameters Value Description
    ProxyPass balancer://<NAME>/ Define your cluster name
    stickysession BALANCEID | PHPSESSIONID | JSESSIONID Define your preferred session sticky method,
    BALANCEID likely by source IP

    PHP|JSESSIONID require to add extra session header on the node member web server

    nofailover On | Off If your web servers do not support session replication, turn this flag on in order to NOT failovering the current session to other member while the node is failed.
    route node name
    lbmethod byrequests | bytraffic | bybusyness
    ProxyPreserveHost On | Off While application using mod_rewrite for friendly URL and it rely on the REQUEST_URI , set this On to preserve the URL request header to http://www.mydomain.com

    (More …)

     
  • levin 4:06 am on February 25, 2010 Permalink | Reply
    Tags: apache, , , performance, ,   

    Performance tuning on Apache, PHP, MySQL, WordPress v1.1 – Updated 

    Introduction

    This tutorial is covering the web server performance tunings on MySQL, PHP and Apache, WordPress and BuddyPress or general web hosting purpose, the tuning example is based on CentOS 5.

    The key of the following performance tuning is focus on memory and caching, most of people host a web site or forum or blog without any tunings or even use the all out-of-box setting.

    (More …)

     
    • Chris 10:41 am on August 27, 2010 Permalink | Reply

      Thank for performa tuning server guide.

    • Eric Nielsen 7:31 am on January 21, 2011 Permalink | Reply

      Followed your instructions to setup FastCGI, all worked well accept at the end, when I hit my website, I get:

      #!/bin/bash
      PHP_CGI=/usr/bin/php-cgi
      PHP_FCGI_CHILDREN=16
      PHP_FCGI_MAX_REQUESTS=1000
      export PHP_FCGI_CHILDREN
      export PHP_FCGI_MAX_REQUESTS
      exec $PHP_CGI

      • levin 1:59 pm on January 21, 2011 Permalink | Reply

        Hi, please make sure you have the similar lines as below.

        ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”

        \< Directory "/var/www/cgi-bin" \>
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
        \< \/Directory \>

  • levin 2:05 am on March 16, 2005 Permalink
    Tags: apache,   

    Apache Virtural Host with dynamic ip address 

    1. Configure your apache reading the httpd.conf with external file.
    Append these line into /etc/httpd/conf/httpd.conf
    include /etc/httpd/conf/virtualhost
    include /etc/httpd/conf/mydomainhost

    2. Configure the update script running with cron
    Put a script into /etc/cron.daily/rc.updatehttpd

    ###############################################
    #!/bin/sh
    HTTPADDR=”`ifconfig ppp0 |grep ‘inet addr’|awk ‘{print $2}’|sed -e ‘s/.*://’`”

    HOSTFILE=”/etc/httpd/conf/mydomainhost”

    echo “NameVirtualHost $HTTPADDR:80″ > /etc/httpd/conf/virtualhost

    echo “” > $HOSTFILE
    echo “DocumentRoot /var/www/html” >> $HOSTFILE
    echo “ServerName http://www.mydomain.com”; >> $HOSTFILE
    echo “
    ” >> $HOSTFILE

    /etc/rc.d/init.d/httpd restart

    ##############################################
    Note: The rc.updatehttpd must be 700 or 755

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel