Я настроил проект Wordpress на Nginx сервере с доменом "http://acerampaia.local" Когда goto http://acerampaia.local/wp-admin, он всегда перенаправляется на http://acerampaia.local и ответ с кодом ошибки 301 :( Ниже приводится содержимое ... / site-availables / acerampaia.conf:
server {
listen 80;
root /var/www/html/wp/acerampaia;
server_name acerampaia.local;
access_log /var/log/nginx/acerampaia_access.log;
error_log /var/log/nginx/acerampaia_error.log;
location / {
index index.php index.html;
try_files $uri $uri/ /index.php?$args;
}
# Specify a charset
charset utf-8;
# GZIP
gzip off;
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
# Prevents hidden files (beginning with a period) from being served
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
###########
# SEND EXPIRES HEADERS AND TURN OFF 404 LOGGING
###########
location ~* ^.+.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
log_not_found off;
expires max;
}
# Pass all .php files onto a php-fpm or php-cgi server
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_read_timeout 3600s;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 128k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
#fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
}
# ROBOTS
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# RESTRICTIONS
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}
}
Пожалуйста, помогите мне, спасибо за просмотр.