Wordpress running very slow on a vagrant virtual machine
<p>I have set up a vagrant virtual machine with ubuntu, php, nginx and mysql to run a wordpress site. </p>

<p>The problem is running very slot and I usually get the 502 bad gateway error. I've also configured the site using mamp in my mac and it goes like 4x faster. </p>

<p>Any ideas on how to improve the virtual machine performance?</p>

<p>Here's my nginx config file:</p>

<pre><code>server {
listen 80;
server_name {{www_domain}};
root   {{www_document_root}};
index index.php;

access_log  /var/log/nginx/{{phpmyadmin_domain}}.access.log;
error_log  /var/log/nginx/{{phpmyadmin_domain}}.error.log error;

# serve static files directly
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
    access_log        off;
    expires           max;
}

location / {
    try_files $uri $uri/ /index.php?q=$uri&amp;$args;
}

location ~ .php$ {
    try_files $uri =404;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    include fastcgi_params;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_intercept_errors on;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 16 64k;
}}
</code></pre>

<p>And here's the VagrantFile config:</p>