R
R
Roman2018-03-29 17:55:15
MODX
Roman, 2018-03-29 17:55:15

The page gives a 302 redirect to a 404 error, how to fix it?

Hello. Website problem . A page that should work as 404 gives a 302 redirect, for example https://akbeexpert.ru/akkumulyator-dlya/honda/cross...
Site on MODx Revo. The problem started after switching from http to https. On the site in the admin panel, the settings for https are, in htaccess, too, "seem to be correct)"
Here are the settings configs on the server side, maybe there is something there?

server {

listen 80;

server_name www.akbexpert.ru 37.46.129.212 akbexpert.ru;

access_log /var/log/nginx/akbexpert.ru.access_log;

error_log /var/log/nginx/akbexpert.ru.error_log info;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Range "";
proxy_set_header Request-Range "";
proxy_redirect off;
rewrite ^(.*)$ <https://akbexpert.ru$1> permanent;

location /.well-known/ {
root /var/www/akbexpert.ru/htdocs/;
}

}


}

[email protected] /etc/nginx/sites-enabled $ cat httpsakbexpert.ru

server {

listen 443 ssl http2;
ssl on;

sslcertificate /etc/letsencrypt/live/akbexpert.ru/fullchain.pem;

sslcertificatekey /etc/letsencrypt/live/akbexpert.ru/privkey.pem;

sslverifydepth 3;
servername akbexpert.ru;


accesslog /var/log/nginx/akbexpert.ru.access.log;

errorlog /var/log/nginx/akbexpert.ru.error.log info;
## Block Software download user agents ##

if ($httpuseragent  LWP::Simple|BBBike|wget|CheckSiteBot) {

return 403;

}
location / {
proxysetheader X-Forwarded-Proto $scheme;
proxypass <http://127.0.0.1:8080>;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Host $http_host;
proxy_set_header X-URI $uri;
proxy_set_header X-ARGS $args;
proxy_set_header Refer $http_refer;
proxy_set_header Range "";
proxy_set_header Request-Range "";

client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 10m;


}

location /.well-known/ {

root /var/www/akbexpert.ru/htdocs/;

}

location ~* ^.+.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf|woff)$ {

root /var/www/akbexpert.ru/htdocs;

expi

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-03-29
@dimonchik2013

maybe there
but in the logs - for sure

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question