官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 宣汉县| 康乐县| 霍山县| 临邑县| 濮阳县| 黄龙县| 保亭| 临江市| 潜山县| 江源县| 昆明市| 沛县| 乌拉特前旗| 农安县| 四子王旗| 革吉县| 柘城县| 张掖市| 开平市| 聂拉木县| 五原县| 汤原县| 黄梅县| 镇江市| 枣庄市| 秦安县| 伊宁县| 内丘县| 阳谷县| 丹江口市| 贞丰县| 新竹市| 化隆| 峨山| 阳江市| 潮州市| 肇庆市| 肇源县| 景德镇市| 东台市| 临猗县|