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

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.

主站蜘蛛池模板: 甘南县| 分宜县| 蓝山县| 子长县| 金山区| 临安市| 辛集市| 莱西市| 东丰县| 鸡泽县| 涞源县| 高阳县| 富锦市| 成安县| 景洪市| 衡阳县| 桂东县| 吴桥县| 安图县| 石泉县| 玉林市| 启东市| 文化| 修文县| 凌源市| 犍为县| 北川| 宣恩县| 博湖县| 长葛市| 卓尼县| 海宁市| 乐陵市| 呼玛县| 黄山市| 饶平县| 揭东县| 安宁市| 黑水县| 神农架林区| 哈密市|