Home > linux > nginx | About

How to configure PHP with nginx

You need to add this to your `server{}` configuration block

         location ~* \.php$ {
           include  fastcgi.conf; 
           try_files $uri =404;         # This is not needed if you have cgi.fix_pathinfo = 0 in php.ini (you should!)
           fastcgi_pass 127.0.0.1:9000;
         }

How to compile additional modules to nginx

./configure --add-module=/path/to/module1/source \
            --add-module=/path/to/module2/source

How to fix the "client intended to send too large body" error

Add

client_max_body_size 20m

inside a server or http directive. Source


contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code How to configure PHP with nginx (generated for current page)