maxbear
08-23-2002, 05:31 PM
Hi all,
I am thinking whether I should upgrade my apache server to version 2.0 or change it to thttpd.
My server is a busy server. There are only html, images and some movies files in this server. The file size for those movies are usually under 500K. It's currently pushing out 3mb - 6mb/s now.
If I upgrade to Apache 2.0, will it increase the performance? Since all of my files are static content.
I know it's good to use thttpd for busy server, can thttpd support mod_rewrite? If not, how can I easily block other sites hotlink to my server?
Thanks for any suggestion.
clocker1996
08-23-2002, 05:37 PM
i suggest running seperate servers
like..
thttpd doesnt support php, i dont think
so what some people do
is they have the www.domain.com run on thttpd
then they php.domain.com setup with apache
running both webservers
so on the site
the php files are linked as http://php.domain.com/file.php
get what im saying?
you could do the same
so if you wanted to use mod rewrite
you could just do
http://apache.yourdomain.com - running apache, have all the mod's you want installed on apache
http://www.thttpd.com - running thttpd
on the same box for just static content etc
just an idea.....
Ahmad
08-23-2002, 06:13 PM
If you don't need the dynamic and wide range of features of Apache, thttpd will probably give you a better performance.
thttpd's model excells as the network transfer overhead outweights processing time (which is the case for static files, espicially large ones).
In Apache, a process (or thread) is started for each request to do the initial work of opening the file, executing the script, .. etc. But then it spends the rest of its time doing nothing but sending the contents over the network to the client.
maxbear
08-23-2002, 06:18 PM
Thanks. In apache, I can add the following code in .htaccess in order to block hotlinking:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://yourIPhere [NC]
RewriteRule [^/]+\.(exe|mpeg|mpg|avi|mp3|gif|jpg|JPG|GIF|MP3|AVI)$ - [F]
RewriteRule ^/cgi-bin/.+$ - [F]
Can it easily be done in thttpd?
clocker1996, I think thttpd supports php, they can work with mod_php now.
bitserve
08-24-2002, 02:06 PM
Some of the busiest sites in the world are still running apache. You might just do some tuning of your apache server and it's configuration file (whether you upgrade or not).
Of course the super busy sites have multiple servers and reverse proxies. :)