August 2017
Intermediate to advanced
278 pages
8h 53m
English
In this instance, we're simply using a standalone WordPress site, which would be deployed in many personal and business scenarios. This is the typical deployment for WordPress.
For ease of management, I've created a dedicated config file just for the WordPress site (/etc/nginx/conf.d/wordpress.conf):
server {
listen 80;
server_name wordpressdemo.nginxcookbook.com;
access_log /var/log/nginx/access.log combined;
location / {
root /var/www/html;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Reload NGINX to read the new configuration file and check your ...
Read now
Unlock full access