July 2018
Intermediate to advanced
420 pages
8h 46m
English
Now, it's time to create the configuration files for the nginx and php-fpm servers, so we will be using the nginx reverse proxy to serve our PHP files to the web.
Inside the nginx folder, create a new file called nginx.conf and add the following code:
server { listen 80 default; client_max_body_size 308M; access_log /var/log/nginx/application.access.log; root /application/public; index index.php; if (!-e $request_filename) { rewrite ^.*$ /index.php last; } location ~ \.php$ { fastcgi_pass php-fpm:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log"; fastcgi_buffers 16 16k; fastcgi_buffer_size 32k; include ...Read now
Unlock full access