- 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.
推薦閱讀
- 大話PLC(輕松動(dòng)漫版)
- Clojure Programming Cookbook
- OpenDaylight Cookbook
- 騰訊iOS測試實(shí)踐
- 無代碼編程:用云表搭建企業(yè)數(shù)字化管理平臺(tái)
- 深入理解Java7:核心技術(shù)與最佳實(shí)踐
- SQL Server 2012數(shù)據(jù)庫管理與開發(fā)項(xiàng)目教程
- 零基礎(chǔ)學(xué)Python數(shù)據(jù)分析(升級(jí)版)
- Unity 5 for Android Essentials
- Apache Spark 2.x for Java Developers
- ArcGIS for Desktop Cookbook
- Python從入門到精通(第3版)
- 深度學(xué)習(xí)程序設(shè)計(jì)實(shí)戰(zhàn)
- Python硬件編程實(shí)戰(zhàn)
- Python預(yù)測分析與機(jī)器學(xué)習(xí)