Welcome! Log In Create A New Profile

Advanced

Doubt about nginx with wordpress

Posted by davidw 
Doubt about nginx with wordpress
February 20, 2017 01:29AM
Good Morning,

I would like to ask a something, i am doing configuration nginx working with wordpress but i can´t access the admin page, my configuration is it:

server {
listen 80;
server_name homolog.teste.com.br;

root /var/www/teste/public_html;
index index.php index.html index.htm;

include /etc/nginx/global-restrictions.conf;

if (!-f $request_filename){
set $rule_0 1$rule_0;
}

if ($rule_0 = "1"){
rewrite ^/(.*)$ /index.php?url=$1 last;
}

location / {
try_files $uri $uri/ /index.php?$args;
}

location ~ (?<upload_form_uri>.*)/x-progress-id:(?<upload_id>\d*) {
rewrite ^ $upload_form_uri?X-Progress-ID=$upload_id;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_buffers 16 128k;
fastcgi_read_timeout 240;
fastcgi_buffer_size 256k;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param PHP_ADMIN_VALUE "open_basedir =/tmp:../resources/libs/:/var/www/odebrechtnoticias/public_html:/var/www/odebrechtnoticias/resources/";
}

location /drake/ {
index index.php;
try_files $uri $uri/ /drake/index.php?q=$uri&$args;
}

rewrite ^/login/(.*)$ /index_ctl.php?sessao=login&pagina=login&url=$1 last;
rewrite ^/news/list/([0-9]+)$ /index_ctl.php?sessao=news&pagina=list&page=$1&$args last;
rewrite ^/news/update/([0-9]+)$ /index_ctl.php?sessao=news&pagina=update&post_id=$1 last;
rewrite ^/news/delete/([0-9]+)$ /index_ctl.php?sessao=news&pagina=delete&post_id=$1 last;
rewrite ^/news/download_zip/([0-9]+)$ /index_ctl.php?sessao=news&pagina=download_zip&post_id=$1 last;
rewrite ^/categories/list/([0-9]+)$ /index_ctl.php?sessao=categories&pagina=list&page=$1&$args last;
rewrite ^/categories/update/([0-9]+)$ /index_ctl.php?sessao=categories&pagina=update&category_id=$1 last;
rewrite ^/categories/delete/([0-9]+)$ /index_ctl.php?sessao=categories&pagina=delete&category_id=$1 last;
rewrite ^/medias/list/([0-9]+)$ /index_ctl.php?sessao=medias&pagina=list&page=$1&$args last;
rewrite ^/medias/update/([0-9]+)$ /index_ctl.php?sessao=medias&pagina=update&media_id=$1 last;
rewrite ^/medias/delete/([0-9]+)$ /index_ctl.php?sessao=medias&pagina=delete&media_id=$1 last;
rewrite ^/magazines/list/([0-9]+)$ /index_ctl.php?sessao=magazines&pagina=list&page=$1&$args last;
rewrite ^/magazines/update/([0-9]+)$ /index_ctl.php?sessao=magazines&pagina=update&magazine_id=$1 last;
rewrite ^/magazines/delete/([0-9]+)$ /index_ctl.php?sessao=magazines&pagina=delete&magazine_id=$1 last;
rewrite ^/ads/list/([0-9]+)$ /index_ctl.php?sessao=ads&pagina=list&page=$1&$args last;
rewrite ^/ads/update/([0-9]+)$ /index_ctl.php?sessao=ads&pagina=update&ad_id=$1 last;
rewrite ^/ads/delete/([0-9]+)$ /index_ctl.php?sessao=ads&pagina=delete&ad_id=$1 last;
rewrite ^/manuals/list/([0-9]+)$ /index_ctl.php?sessao=manuals&pagina=list&page=$1&$args last;
rewrite ^/manuals/update/([0-9]+)$ /index_ctl.php?sessao=manuals&pagina=update&manual_id=$1 last;
rewrite ^/manuals/delete/([0-9]+)$ /index_ctl.php?sessao=manuals&pagina=delete&manual_id=$1 last;
rewrite ^/quizzes/list/([0-9]+)$ /index_ctl.php?sessao=quizzes&pagina=list&page=$1&$args last;
rewrite ^/quizzes/update/([0-9]+)$ /index_ctl.php?sessao=quizzes&pagina=update&quiz_id=$1 last;
rewrite ^/quizzes/delete/([0-9]+)$ /index_ctl.php?sessao=quizzes&pagina=delete&quiz_id=$1 last;
rewrite ^/autores/list/([0-9]+)$ /index_ctl.php?sessao=autores&pagina=list&page=$1&$args last;
rewrite ^/autores/update/([0-9]+)$ /index_ctl.php?sessao=autores&pagina=update&author_id=$1 last;
rewrite ^/autores/delete/([0-9]+)$ /index_ctl.php?sessao=autores&pagina=delete&author_id=$1 last;
rewrite ^/comments/(posts|quiz)$ /index_ctl.php?sessao=comments&pagina=comments&moderation_area=$1 last;
rewrite ^/([a-z0-9_-]+)[/]?$ /index_ctl.php?sessao=$1&pagina=$1 last;
rewrite ^/([a-z0-9_-]+)/([a-z0-9_-]+)(.html|/)?$ /index_ctl.php?sessao=$1&pagina=$2 last;


}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready