1

Не могу заставить WordPress работать с моей конфигурацией NGINX. PhpMyAdmin (быстрый Cgi-шлюз) в порядке, но я получаю код ошибки HTTP 404 при попытке доступа к http://junon/wordpress/wp-admin/install.php, но с junon/phpmyadmin все в порядке

Путь установки worpress - /var /www /wordpress.

Ниже моя конфигурация NGINX

    user  www-data;

рабочий_процесс 1; pid /var/run/nginx.pid; # должен соответствовать местоположению, определенному в /etc/init.d/file.pid events {worker_connections 1024; }

http {

include    /etc/nginx/mime.types;

server_tokens                   off;
sendfile on;
tcp_nopush   on;
server_names_hash_bucket_size 128; # this seems to be required for some vhosts

gzip              on;
gzip_http_version 1.1;
gzip_comp_level 9;
gzip_proxied      any;
gzip_min_length   500;
gzip_disable      "MSIE [1-6]\.";
gzip_types        text/plain text/xml text/css
                  text/comma-separated-values
                  text/javascript
                  application/x-javascript
                  application/atom+xml;

ssl_session_cache   shared:SSL:10m;
ssl_session_timeout 10m;

сервер {

    listen 80;
    server_name             junon;

    location / {
    root        /var/www;
}

location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
            deny all;
    }



    location /phpmyadmin {

           root /usr/share/;
           index index.php index.html index.htm;
           location ~ ^/phpmyadmin/(.+\.php)$ {
                   try_files $uri =404;
                   root /usr/share/;
                   fastcgi_pass 127.0.0.1:3000;
                   fastcgi_index index.php;
                   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                   include /etc/nginx/fastcgi_params;
           }

    location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                   root /usr/share/;
           }
    }

    location /phpMyAdmin {
                   rewrite ^/* /phpmyadmin last;
    }


    location /wordpress {

    try_files $uri $uri/ /index.php?$args;
           root /var/www/wordpress/;
           index index.php index.html index.htm;
           location ~ ^/wordpress/(.+\.php)$ {

                   root /var/www/wordpress/;
                   fastcgi_pass 127.0.0.1:3000;
                   fastcgi_index index.php;
                   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                   include /etc/nginx/fastcgi_params;
           }
    }

}

0