I
I
Ingerniated2017-06-08 16:04:06
Nginx
Ingerniated, 2017-06-08 16:04:06

How to properly uncomment php strings?

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

Do they need to be made like this?
What does location mean ~ \.php$at this moment?
what is fastcgi responsible for?
location ~ \.php$ {
         root           /home/user/php/;
         fastcgi_pass   127.0.0.1:9000;
         fastcgi_index  index.php;
         fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
         include        fastcgi_params;
        }

In Apache, you just had to specify the path to php.ini
Here it is not necessary?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RidgeA, 2017-06-08
@Ingernirated

~ \.php$
- regular. Any request that ends with .php (not taking into account GET arguments)
fastcgi - php-fpm interaction protocol
About setting up nginx+php-fpm on the Internet ∞+1 article.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question