I can’t reinstall wordpress

Asked

Viewed 28 times

0

I have a server vhost Nginx called site-responsive.test follows below the configuration

server {
    listen 80;
    server_name site-responsivo.test;
    root /home/rafaelejosi/www/projetos/site-responsivo.test/; 

    index index.html index.htm index.php;

    charset utf-8;

    location / {
       try_files $uri $uri/ /index.php?$query_string;
    }
    #Este fuciona no link http://site-responsivo.test/wordpress/
    location /wordpress {
        index index.php index.html index.htm index.nginx-debian.html;
        try_files $uri $uri/ /index.php?$query_string;
    }

    #O site original esta quebrado com erro no nginx 403 Forbidden http://site-responsivo.test/

    location /php {
        index index.php index.html index.htm index.nginx-debian.html;
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log on;
    error_log  /var/log/nginx/site-responsivo.test-error.log error ;
    rewrite_log on;

    error_page 404 /index.php;

    sendfile off;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }

    location ~ /\.ht {
        deny all;
    }
}

knowing that the directory structure is this

inserir a descrição da imagem aqui

what is the right way to set up this vhost for the two to work?

  • 1

    Is making a mistake in http://site-responsivo.test/ or http://site-responsivo.test/php ? If it is the first: there is some file of index in the briefcase site-responsivo.test?

  • @Valdeirpsr nessa http://site-responsivo.test/ but now I realized the error everything was moved to this http://site-responsivo.test/php and this working ta normal kkk, but I didn’t even connect

  • @Valdeirpsr but taking the opportunity the pages in http://site-responsivo.test/php work normal, http://site-responsivo.test/wordpress, where I have the same menu not linking to the other pages of file not found, vo see if I can publish the site on any server have any suggestions host-free that to move up wordpress and the version that is in php?

  • @By the way, Valdeirpsr has to program a redirect for when typing http://site-responsivo.test go automatically to http://site-responsivo.test/php ignoring 404 even at the local installation?

  • As you duplicated the site, you may need to check the settings in the database.

  • And to right the wrong 404 (in http://site-responsivo.test/), you can use rewrite or try_files /php/index.php?$args

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.