One response to “How To Setup a NGINX Virtual Host Using a Custom Domain”

  1. voku

    you can speedup (expire) the pictures … with this settings

    location ~* ^.+.(htm|html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
    access_log off;
    expires max;
    root /var/www/example.com/html/;
    }
    

    I also read about adding this… ?!?

    if (-f $request_filename) {
    break;
    }
    
  2. Andreas

    Great guide, however if php-fpm are running through the socket name the php-block should be something like this:

    location ~ \.php$
    {
    include /etc/nginx/fastcgi.conf;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    }

Leave a Reply