- NGINX Cookbook
- Tim Butler
- 120字
- 2021-07-03 00:04:22
How to do it...
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 log files if there are any errors. If you're installing WordPress from scratch, you should see the following:

You can complete the WordPress installation if you haven't already.
推薦閱讀
- PowerCLI Cookbook
- HTML5 移動Web開發(fā)從入門到精通(微課精編版)
- AngularJS深度剖析與最佳實踐
- Mastering macOS Programming
- C語言程序設(shè)計學(xué)習(xí)指導(dǎo)與習(xí)題解答
- Java 9模塊化開發(fā):核心原則與實踐
- Java系統(tǒng)化項目開發(fā)教程
- R語言與網(wǎng)絡(luò)輿情處理
- Multithreading in C# 5.0 Cookbook
- R語言數(shù)據(jù)可視化:科技圖表繪制
- 新印象:解構(gòu)UI界面設(shè)計
- 交互式程序設(shè)計(第2版)
- 官方 Scratch 3.0 編程趣味卡:讓孩子們愛上編程(全彩)
- MySQL從入門到精通
- Mastering Responsive Web Design