Slow Response after modifiying apache configuration file (httpd.conf)

Discussion in 'Apache' started by hatifahanna, Apr 5, 2011.

  1. #1
    Hi..

    I configure virtualhost on my httpd.conf . and getting slow response when browsing my website. Please help me on how to explain the slow response while page loading.

    This is my file

    
    
    ###### VIRTUALHOST: 2 ######
    <VirtualHost IP:80>
            DocumentRoot "/usr/local/mxae/apache2/htdocs/mydomaincom/"
            ServerName mydomain.com
            ServerAlias *.mydomain.com
           #ServerAlias *.mydomain.com www.mydomain.com
    	ServerAlias mydomain.com www.mydomain.com
    
            RewriteCond %{HTTP_HOST} employee\.mydomain\.com [NC]
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
            RewriteRule ^/(.*) https://employee.mydomain.com/index.php?tpt=marsh [R]
    
    	RewriteCond %{HTTP_HOST} staff\.mydomain\.com [NC]
    	#RewriteCond %{SERVER_PORT} !^443$
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
           #RewriteRule ^/(.*) https://www.mydomain.com/index.php?ch=qq&tpl_id=tn_qq_pf_no [R]
    	RewriteRule ^/(.*) https://staff.mydomain.com/index.php?tpt=staff [R]
    
    	RewriteCond %{HTTP_HOST} gov\.mydomain\.com [NC]
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
            #RewriteRule ^/(.*) https://www.mydomain.com/index.php?tpl=tn_qq_popup.php&agent=0012029 [R]
    	RewriteRule ^/(.*) https://gov.mydomain.com/index.php?tpt=gov [R]
    
    	RewriteCond %{HTTP_HOST} direct\.mydomain\.com [NC]
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
            #RewriteRule ^/(.*) https://www.mydomain.com/index.php?tpl=tn_qq_popup.php&agent=0000345 [R]
    	RewriteRule ^/(.*) https://direct.mydomain.com/index.php?tpt=direct [R]
    
    	RewriteCond %{HTTP_HOST} lead\.mydomain\.com [NC]
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
            #RewriteRule ^/(.*) https://www.mydomain.com/survey_form/form.php?agent_code=0000345 [R]
    	RewriteRule ^/(.*) https://lead.mydomain.com/index.php?tpt=lead [R]	
    
    	#RewriteCond %{HTTP_HOST} lead\.mydomain\.com [NC]
            #RewriteCond %{QUERY_STRING} !tpt= [NC]
            #RewriteCond %{QUERY_STRING} !tpl= [NC]
            #RewriteCond %{QUERY_STRING} !rp= [NC]
            #RewriteCond %{REQUEST_URI} ^/index.php [OR]
            #RewriteCond %{REQUEST_URI} ^/$
    	#RewriteCond %{HTTPS} !=on
            #RewriteRule ^/(.*) https://www.mydomain.com/survey_form/form.php?agent_code=0000345 [R]
            #RewriteRule ^/(.*) http://www.mydomain.com/index.php?tpl=tn_qq_popup.php&agent=0012029  [R]
    
            ErrorLog "/usr/local/mxae/apache2/logs/mydomaincom-error_log"
            CustomLog "/usr/local/mxae/apache2/logs/mydomaincom-access_log" combined
            ErrorDocument 501 /?err=501
            ErrorDocument 500 /?err=500
            ErrorDocument 404 /?err=404
            ErrorDocument 403 /?err=403
            ErrorDocument 401 /?err=401
            ErrorDocument 400 /?err=400
            AddType text/vnd.wap.wml wml
            AddType image/vnd.wap.wbmp wbmp
            AddType application/vnd.wap.wmlc wmlc
            AddType text/vnd.wap.wmlscript wmls
            AddType application/vnd.wap.wmlscriptc wmlsc
            RewriteEngine on
            RewriteRule ^(.*)templates/ $1 [R]
            RewriteRule ^(.*)cron/ $1 [R]
            RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    
            php_admin_value open_basedir "/usr/local/mxae/apache2/htdocs/mxlib/:/tmp/:/usr/local/mxae/apache2/htdocs/mydomaincom/:/usr/local/mxae/apache2/logs/"
    </VirtualHost>
    ###### /VIRTUALHOST: 2 ######
    
    ###### VIRTUALHOST: 5 SSL ######
    <VirtualHost IP:443>
            SetEnvIf User-Agent ".*MSIE.*" \
             nokeepalive ssl-unclean-shutdown \
             downgrade-1.0 force-response-1.0
            SSLEngine On
    	#<Files ~ "\.(cgi|shtml|php)$">
    	#	SSLOptions +StdEnvVars
    	#</Files>
            # Note  - This is cert for www.otherdomain, temporary installed for https enablement.
            SSLCertificateFile /usr/local/mxae/apache2/conf/ssl.crt/SSL_eip2010.crt
            SSLCertificateKeyFile /usr/local/mxae/apache2/conf/ssl.key/SSL_eip2010.key
            SSLCertificateChainFile /usr/local/mxae/apache2/conf/ssl.crt/root_cert.crt
    #intermediate.crt
            #SSLOptions +StrictRequire
    	SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
            DocumentRoot "/usr/local/mxae/apache2/htdocs/mydomaincom/"
            ServerName www.mydomain.com
           #ServerAlias mydomain.com www.mydomain.com
    	ServerAlias *.mydomain.com www.mydomain.com
    
    ##### new added 1/4/2011
    	RewriteCond %{HTTP_HOST} employee\.mydomain\.com [NC]
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
            RewriteRule ^/(.*) https://employee.mydomain.com/index.php?tpt=marsh [R]
    
    	RewriteCond %{HTTP_HOST} staff\.mydomain\.com [NC]
            #RewriteCond %{SERVER_PORT} !^443$
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
            #RewriteRule ^/(.*) https://www.mydomain.com/index.php?ch=qq&tpl_id=tn_qq_pf_no [R]
            RewriteRule ^/(.*) https://staff.mydomain.com/index.php?tpt=staff [R]
    
            RewriteCond %{HTTP_HOST} gov\.mydomain\.com [NC]
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
            #RewriteRule ^/(.*) https://www.mydomain.com/index.php?tpl=tn_qq_popup.php&agent=0012029 [R]
            RewriteRule ^/(.*) https://gov.mydomain.com/index.php?tpt=gov [R]
    
    	RewriteCond %{HTTP_HOST} direct\.mydomain\.com [NC]
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
            #RewriteRule ^/(.*) https://www.mydomain.com/index.php?tpl=tn_qq_popup.php&agent=0000345 [R]
            RewriteRule ^/(.*) https://direct.mydomain.com/index.php?tpt=direct [R]
    
            RewriteCond %{HTTP_HOST} lead\.mydomain\.com [NC]
            RewriteCond %{QUERY_STRING} !tpt= [NC]
            RewriteCond %{QUERY_STRING} !tpl= [NC]
            RewriteCond %{QUERY_STRING} !rp= [NC]
            RewriteCond %{REQUEST_URI} ^/index.php [OR]
            RewriteCond %{REQUEST_URI} ^/$
            #RewriteRule ^/(.*) https://www.mydomain.com/survey_form/form.php?agent_code=0000345 [R]
            RewriteRule ^/(.*) https://lead.mydomain.com/index.php?tpt=lead [R]
    
    #### end adding 1/4/2011
    
            ErrorLog "/usr/local/mxae/apache2/logs/otherdom005-ssl-error_log"
            CustomLog "/usr/local/mxae/apache2/logs/otherdom005-ssl-access_log" combined
    	CustomLog /usr/local/mxae/apache2/logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
            ErrorDocument 501 /?err=501
            ErrorDocument 500 /?err=500
            ErrorDocument 404 /?err=404
            ErrorDocument 403 /?err=403
            ErrorDocument 401 /?err=401
            ErrorDocument 400 /?err=400
            AddType text/vnd.wap.wml wml
            AddType image/vnd.wap.wbmp wbmp
            AddType application/vnd.wap.wmlc wmlc
            AddType text/vnd.wap.wmlscript wmls
            AddType application/vnd.wap.wmlscriptc wmlsc
            RewriteEngine on
            RewriteRule ^(.*)templates/ $1 [R]
            RewriteRule ^(.*)cron/ $1 [R]
            RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
            RewriteRule .* - [F]
    </VirtualHost>
    
    <VirtualHost IP:80>
            ServerName mydomain.com.my
            ServerAlias *.mydomain.com.my
    	Redirect permanent / https://www.mydomain.com
    </VirtualHost>
    <VirtualHost IP:443>
            ServerName mydomain.com.my
            ServerAlias *.mydomain.com.my
            Redirect permanent / https://www.mydomain.com
    </VirtualHost>
    
    
    PHP:
    please help..

    at least if u guy can help me explain what had caused the slow response...really appreciate...thanks
     
    hatifahanna, Apr 5, 2011 IP
  2. saima.spider

    saima.spider Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    use top -c and apache error logs to find out that
    check if there is any infinity loops happening
     
    saima.spider, Apr 14, 2011 IP