r00t.gr

Programming and more

Entries for the ‘Web Hosting’ Category

How to add expires headers on css, javascript and image files

I tried many things I found googling but nothing work, until I saw this: Assuming you are using apache, what you must do is go to you public_html folder, create a file .htaccess and paste in it:     <FilesMatch "\.(ico|pdf|flv|jpe?g|png|gif|js|css|swf)$"> ExpiresActive On ExpiresDefault "access plus 1 year" </FilesMatch> <FilesMatch "\.(ico|pdf|flv|jpe?g|png|gif|js|css|swf)$"> ExpiresActive On ExpiresDefault "access […]

Openvz + rsync problem Disk quota exceeded (122) [fixed]

Ok I had this annoying error. I rent servers to clients, and I user VPSs on another server to backup them. This one client (latest client) had a problem. When I used rsync to move files to the Backup VPS I got a lot of these errors: rsync: write failed on "/vz/private/106/mnt/sdb1/var/lib/mysql/ibdata1": Disk quota exceeded […]

fix quota error on cpanel openvz systems

To fix that please read this: http://forums.cpanel.net/f5/fixquota-script-error-46270.html

How to redirect all non www traffic to www

I found that it is usually a good idea, to redirect all trafic that doesn’t have www infront of the domain to www.domain.com. I explain how to do it with apache mod_rewrite in the end of the post, scroll there if you just need the answer. Let’s say, a user types http://domain.com he should redirect […]