0
我在Nginx中使用了一個非常特殊的配置來重寫URL,但是它會阻塞/ phpmyadmin。PHPMyAdmin和Nginx
我已經嘗試噸不同的方式製造PMA回來,但沒有任何工作..
請幫我做PMA可與此配置中的URL重寫WP:
server
{
listen 80;
server_name localhost;
root /var/www;
# Static
location/{
index index.html index.htm index.php;
}
# PHP scripts -> PHP-FPM server listening on 127.0.0.1:9000
location ~ \.php$ {
# The following line prevents malicious php code to be executed through some uploaded file (without php extension, like image)
# This fix shoudn't work though, if nginx and php are not on the same server, other options exist (like unauthorizing php execution within upload folder)
# More on this serious security concern in the "Pass Non-PHP Requests to PHP" section, there http://wiki.nginx.org/Pitfalls
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Security
location ~ /\.ht {
deny all;
}
# Stuffs
location = /favicon.ico {
access_log off;
return 204;
}
rewrite ^/wp-admin$ /wp-admin/ permanent;
if (-f $request_filename){
set $rule_2 1;
}
if (-d $request_filename){
set $rule_2 1;
}
if ($rule_2 = "1"){
}
rewrite ^/(wp-(content|admin|includes).*) /$1 last;
rewrite ^/(.*.php)$ /$1 last;
rewrite /. /index.php last;
}
嘗試,但沒有改變..對於DNS,問題是,我在我的DNS設置wilcard * .domain.tld WP上的多站點.. – user3720154 2014-08-28 14:30:49
這是特別是這導致問題:重寫/。 /index.php最後;當我註釋掉其他重寫指令(如你給我的指令)不會改變任何東西。當我評論前面提到的那個時,PMA可以,但是我在MP上的URL重寫失敗.. – user3720154 2014-08-28 14:34:32