Skip to content

Instantly share code, notes, and snippets.

@vnykmshr
Last active March 9, 2016 08:36
Show Gist options
  • Save vnykmshr/9507720 to your computer and use it in GitHub Desktop.
Save vnykmshr/9507720 to your computer and use it in GitHub Desktop.
Magento: Nginx + Varnish + Mysql stack
apt-get update
apt-get upgrade
apt-get install mysql-server
mysql_secure_installation
apt-get install nginx
apt-get install git-core
apt-get install php5-fpm php5-mysql php5-common php5-mcrypt php5-gd php5-curl php5-json php-soap php-apc
apt-get install yui-compressor
# disable fixpathinfo, edit /etc/php5/fpm/php.ini
cgi.fix_pathinfo=''
# setup magento install: will use git deploy method
# enable mcrypt
ln -sf /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
php5enmod mcrypt
setup magento site on nginx
setup varnish; edit /etc/default/varnish and /etc/varnish/default.vcl
test varnish config: varnishd -C -f /etc/varnish/default.vcl
verify app access using varnish/nginx server
setup magento database setup
deploy magento code
complete magento installation from web
Install varnish cache plugin http://www.magentocommerce.com/magento-connect/pagecache-powered-by-varnish.html
Enable varnish plugin from Magento admin
we are all set now.
To enable ssl; bring nginx to the front, as ssl does not support ssl yet.
start varnish with -a 127.0.0.1:6081
nginx (ssl) + varnish + nginx (fpm) sandwich would do the trick.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment