Monthly Archives: December 2013

protect 80 port from syn

iptables -A INPUT -j ACCEPT -p tcp –dport 80 -m state –state NEW -m limit –limit 40/s –limit-burst 5 -m comment –comment ‘Allow incoming HTTP’
iptables -A INPUT -j ACCEPT -p tcp –dport 443 -m state –state NEW -m limit –limit 40/s –limit-burst 5 -m comment –comment ‘Allow incoming HTTPS’

Also useful:
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -j ACCEPT -m state –state RELATED,ESTABLISHED -m limit –limit 100/s –limit-burst 50

tuning load in prestashop

Preferences / SEO & URLs

Set up URLs:
Friendly URL YES
Accented URL YES
Automatically redirect to the canonical URL YES
Disable apache multiviews YES
Disable apache mod security YES

Smarty Cache:
Never recompile template files
Check Cache
Do not open console

CCC (Combine, Compress and Cache):
Use CCC for CSS
Use CCC for JavaScript.
Keep HTML as original
Keep inline JavaScript in HTML as original
Check Apache optimization

Ciphering
Use Rijndael with mcrypt lib.

Caching
Check Use cache
Caching system : File System

Implementing browser static cached file for prestashop
Its a fancy name, but its really just some .htaccess rules with some expire and caching headers. Se bellow:
Apache


ForceType text/html
FileETag None

AddEncoding gzip .gz
AddType text/html .gz


SetEnvIfNoCase Request_URI .gz$ no-gzip


Header set Vary “Accept-Encoding, Cookie”
Header set Cache-Control ‘max-age=3600, must-revalidate’


ExpiresActive On
ExpiresByType text/html A3600

change domain in Magento

Update your core_config_data table to edit the two records for web/unsecure/base_url and web/secure/base_url
Delete the contents of WEBROOT/var/cache
Update / edit any .htaccess domain redirects you may have added
Restart Apache
Make sure Apache has write permissions to WEBROOT/var
If you created a new DB, ensure that the WEBROOT/app/etc/local.xml is pointing to it.
If you’re using Chrome, clear your browser cache! (Chrome caches 301s)

cpufreqd

cpufreqd is used to monitor the status of the system and adjust the frequency of the CPU according to the user configuration. The behaviour of the daemon is fully configurable. Logs are reported through syslogd.