You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Hall <si...@gmail.com> on 2010/01/25 21:28:45 UTC

[users@httpd] virtual hosts help please

Hello,

I run a cpanel machine with the following versions:

cPanel 11.25.0-R42404
WHM 11.25.0 - X 3.9
CENTOS 4.7 i686
Apache 2.0.63


We have a client that is running a real estate website using a product from
Transparent Rets that connects and downloads a MLS (real estate) feed to
display on their site.

Transparent Rets has recommended we set the Apache timeout on this site to
10000 seconds.

Needless to say I do not want to set this for every site, so I wanted to try
to use a virtual host directive for this.

I found a few automatically generated virtual host directives on my server
in the /etc/httpd/conf/sites directory so I copied one of those and added
the time out.

First, if anyone could review my attempt to make a virtual host directive I
would *GREATLY* appreciate it.

Second, is there any way to verify the timeout has been increased for this
site, and only this site?


Here is the contents of the file.  I have used xxxx's for privacy





DocumentRoot /home/xxxx/public_html
Port 80
DirectoryIndex index.htm index.html
ServerRoot /usr/local/apache

<VirtualHost 67.225.156.165:80>
    ServerName xxxxx.com
    ServerAlias www.xxxxx.com
    DocumentRoot /home/xxxx/public_html
    ServerAdmin webmaster@xxxx.com
    Timeout 7000
    ## User xxxx # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup xxxx xxxx
    </IfModule>
    <IfModule concurrent_php.c>
        php4_admin_value open_basedir
"/home/xxxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
        php5_admin_value open_basedir
"/home/xxxx:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule !concurrent_php.c>
        <IfModule mod_php4.c>
            php_admin_value open_basedir
"/home/xxxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
        </IfModule>
        <IfModule mod_php5.c>
            php_admin_value open_basedir
"/home/xxxx:/usr/lib/php:/usr/local/lib/php:/tmp"
        </IfModule>
        <IfModule sapi_apache2.c>
            php_admin_value open_basedir
"/home/xxxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
        </IfModule>
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup xxxxx xxxx
    </IfModule>
    CustomLog /usr/local/apache/domlogs/xxxxx.com-bytes_log "%{%s}t %I
.\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/xxxxx.com combined
    ScriptAlias /cgi-bin/ /home/xxxx/public_html/cgi-bin/
</VirtualHost>

Re: [users@httpd] virtual hosts help please

Posted by Justin Pasher <ju...@newmediagateway.com>.
I didn't see any replies, so I figured I say something...

Chris Hall wrote:
> Hello,
>
> I run a cpanel machine with the following versions:
>
> cPanel 11.25.0-R42404
> WHM 11.25.0 - X 3.9
> CENTOS 4.7 i686
> Apache 2.0.63
>
>
> We have a client that is running a real estate website using a product 
> from Transparent Rets that connects and downloads a MLS (real estate) 
> feed to display on their site.
>
> Transparent Rets has recommended we set the Apache timeout on this 
> site to 10000 seconds.

That seems ridiculously high. Almost 3 hours for a timeout? Is this a 
third party that is connecting to YOUR Apache server and doing a GET or 
POST on a page? Is it really expected to potentially take that long to 
complete the request? Is there some sort of extreme latency or 
unreliability with the connections between the boxes? If there is active 
data being transmitted between the two system, then it essentially 
"resets" the timeout counter, so this setting indicates a 10000 for the 
following (from the docs):

1. The total amount of time it takes to receive a GET request.
2. The amount of time between receipt of TCP packets on a POST or PUT 
request.
3. The amount of time between ACKs on transmissions of TCP packets in 
responses.

> I found a few automatically generated virtual host directives on my 
> server in the /etc/httpd/conf/sites directory so I copied one of those 
> and added the time out.

You should really determine which ones are actually being used by the 
site in question instead of just adding things anywhere you see a 
VirtualHost container.

> First, if anyone could review my attempt to make a virtual host 
> directive I would *GREATLY* appreciate it.
>
> Second, is there any way to verify the timeout has been increased for 
> this site, and only this site?

The docs state that the Timeout directive can be set within a 
VirtualHost container, so that should work fine. There is no way that I 
know of to verify it was set, but if the directive is within a 
VirtualHost container, you should be good.

--
Justin Pasher

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org