Archive for December, 2009

squid+apache = good cache, protection from ddos

December 10th, 2009

just reconfigured my webserver runing on localhost why?
read under ….
1. what is best practice to have good performance ? – CACHE ! which means if your webserver know where is file(image,song, swf .. etc) located on hard drive and already opened it ones with another customer, why it must be opened second time ? with webserver ? it will make a good lick on performace site if youre runing heavy site with lot of pictures.
2. what is the best program for working on many simple GET/POST/CONNECT requests ? – Squid – caching proxy server runing under Linux and using all power of linux fs for making cache and make it fast
i just made a hibrid combination on my squid ( runing on 80 port) and apache (runing on 127.0.0.1:80).
here is simple config of my squid
http_port 62.75.250.93:80 transparent

icp_port 0

htcp_port 0

hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin \?

no_cache deny QUERY

cache_swap_low 64

cache_swap_high 128

maximum_object_size 2048 KB

cache_replacement_policy heap LFUDA

memory_replacement_policy heap GDSF

fqdncache_size 2048

cache_dir ufs /tmp/squid 2000 11 11

cache_access_log /var/log/squid/access.log

cache_log /var/log/squid/cache.log

cache_store_log /dev/null

hosts_file /etc/hosts

dns_nameservers 127.0.0.1

refresh_pattern ^ftp: 1440 20% 10080

refresh_pattern ^gopher: 1440 0% 1440

refresh_pattern . 0 20% 4320

peer_connect_timeout 30 seconds

acl all src 0.0.0.0/0.0.0.0

acl site dst 127.0.0.1/32

acl max_con maxconn 20

http_access deny max_con all

forwarded_for off

http_access deny all !site

http_reply_access deny all !site

icp_access deny all !site

miss_access deny all !site

cache_effective_user proxy

cache_effective_group proxy

visible_hostname Wishmaster

cache_mgr moushegh@nazaretyan.com

always_direct allow all

never_direct deny all
on apache you just need to change Virtual host and LISTEN to 127.0.0.1 (remeber to add your host under localhost at /etc/hosts)
max_con – is a acl that will not allow more then 20 concurrent connections from 1 IP – good method for protecting from http get and syn flood attacks
any questions ? ready to answer on comments or via skype

BaCk vS ToO

December 1st, 2009

In today’s business economy, it is important to have a complete solution that not only compensates for your current operations, but supports the growth ofyour business into the future as well. If the internet is the core of your business, a conventional web hosting solution might not be able to provide the level of control and flexibility you require, at least from a long-term perspective.  Because of this, there just may come a time when you need to strongly consider dedicated hosting.

What is Dedicated Hosting?

To give you a better understanding of dedicated hosting, I’ll first give a quick brief on conventional web hosting, better known as shared hosting. This is the type of environment where you are literally sharing server space and critical resources with other website owners. This could be tens, hundreds or even thousands of people.Dedicated hosting you could say, is the exact option. As the name implies, this is a situation where the entire server is dedicated to your business. With an entire machine at your disposal, you have enough server capacity to host one or multiple websites. Aside from disk space, you also have an abundance of bandwidth along with enough RAM and CPU to make your website perform like a champ. Whereas shared hosting leaves you limited, a dedicated server opens up the floor, providing you with more than enough room to work with.

Benefits of Dedicated Hosting

A dedicated server only makes sense for the large corporation or emerging small to medium-sized business, delivering benefits that simply can’t be provided on other platforms. Below I’ll touch on some of the key benefits of dedicated hosting:

Enhanced Stability and Performance

With dedicated hosting, you are pretty much assured a better performance. In this environment, there are no other sites on the server to leach off your disk space, bandwidth and other essential resources. This means you can enjoy a maximum uptime with a high level of performance your visitors are sure to appreciate.

Extreme Flexibility

One of the biggest attractions of the dedicated server is flexibility. On a shared server you are restricted and typically limited to the resources and tools the web host provides. With dedicated hosting you call the shots, able to incorporate the software applications and technologies you desire. The options are endless, ranging from the control panel and operating system to programming languages and database systems.

Enhanced Security

A dedicated server offers unparalleled security, an attribute that is invaluable these days. This hosting solution gives you the option of implementing the security protocols and mechanisms able to provide your business with the best protection. You can install firewalls, anti-virus solutions, DDoS protection software – the possibilities are endless when it comes to network security. Simply put – adedicated server can be as secure as you make it.

Though more expensive than shared web hosting, dedicated hosting is worth every penny to the business that demands the utmost in control and flexibility. Throw in enhanced stability and security and it becomes a solution your flourishing business just might not be able to do without.

Time for a dedicated server?  Check out the dedicated hosting packages offered byHostGator.  The Gator has dedicated servers available in both Windows and Linux flavors, giving you the best in server hardware and guaranteed network resources.