Как совместить два конфига в nginx?

Есть nginx, который выступает в роли реверсивного сервера.

server {
        server_name xxx.ru http2;
        resolver 8.8.8.8 8.8.4.4 valid=300s;
        resolver_timeout 5s;
        add_header Strict-Transport-Security "max-age=31536000" always;
        add_header X-Frame-Options DENY;
        add_header X-Content-Type-Options nosniff;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        gzip on;
        gzip_proxied any;
        gzip_types
                        text/css
                        text/javascript
                        application/javascript
                        application/json
                        text/xml
            text/json;

        location / {
                proxy_pass http://localhost:3000/;
        }

        location /assets/ {
                proxy_pass http://localhost:3000/assets/;
        }

Стоит задача дополнительно поднять wordpress. Поставил php, mysql. Дал права на папку /var/www/wordpress, куда извлек архив сайта

 location / {
                proxy_pass http://localhost:3000/;
        }

        location /assets/ {
                proxy_pass http://localhost:3000/assets/;
        }

        root /var/www/wordpress;
        index index.php index.html index.htm;


        location /wp {
             try_files $uri /index.html index.php;
        }


        location ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            include fastcgi.conf;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            #include fastcgi_params;
            fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;

        }

Но почему тот 404 ошибка введите сюда описание изображения


Ответы (0 шт):