D
D
DaNko882015-11-27 02:08:11
PHP
DaNko88, 2015-11-27 02:08:11

Magento 2 (nginx + php-fpm) or (nginx + apache)?

Good evening, can magento 2 work without apache + mod_php, through nginx + php-fpm?
Or is it desirable to use apache for magento?
through nginx + php-fpm gives a white screen

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Fedyuk, 2015-11-27
@dfediuk

Magento 2 is definitely capable of running without Apache.
My Nginx + PHP-FPM settings to run Magento 2 in a subfolder: https://mage2.ru/t/58

S
sunrails, 2015-11-27
@sunrails

Yes, maybe devdocs.magento.com/guides/v2.0/install-gde/system...
Sample config https://github.com/magento/magento2/blob/develop/n...

D
deenoize, 2016-01-26
@deenoize

This is a common mistake, but strangely enough, there is practically no solution anywhere. I lost 2 days myself. Found only in Magento bugtracker on github. Sharing Changed nginx.conf.sample
/setup location block to:

location /setup {
    root $MAGE_ROOT;
    location ~ ^/setup/index.php {

        ### This fixes the problem:
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        ################################

        fastcgi_pass   fastcgi_backend;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location ~ ^/setup/(?!pub/). {
        deny all;
    }

    location ~ ^/setup/pub/ {
        add_header X-Frame-Options "SAMEORIGIN";
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question