My actions: I install only: nginx 1.10.1, php7 and mysql 5.6 on ubuntu 14.04.
php install: sudo apt-get install -y php7.0-fpm php7.0-common php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-zip php7.0-bcmath php7.0-iconv php7.0-opcache php7.0-soap php7.0-json php7.0-xml
I copy sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/agestor.com
.
In agestor.com paste:
upstream fastcgi_backend {
server unix:/var/run/php/php7.0-fpm.sock;
}
server {
listen 443 ssl;
server_name agestor.com;
set $MAGE_ROOT /var/www/agestor.com/html;
set $MAGE_MODE default;
include /var/www/agestor.com/html/nginx.conf.sample;
}
server {
listen 80;
server_name agestor.com;
set $MAGE_ROOT /var/www/agestor.com/html;
set $MAGE_MODE default;
include /var/www/agestor.com/html/nginx.conf.sample;
}
And include him: sudo ln -s /etc/nginx/sites-available/agestor.com /etc/nginx/sites-enabled/
But not install magento 2.
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
error.log: 2016/06/21 14:21:35 [error] 13909#13909: *46 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 37.146.123.141, server: agestor.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "www.agestor.com"
I set up my VPS on this article: magento 2 for ubuntu 14.04
Best Answer
Magento2 contains NGINX config
nginx.conf.sample
that can be included in you server section. Let's try with minimal configuration;You need to modify
/etc/nginx/sites-available/my-domain.com
with the following content:and then add other settings do not relate to Magento