M
M
Magi2016-04-10 03:02:53
Nginx
Magi, 2016-04-10 03:02:53

How to fix "Invalid redirect on page"?

Virtual ubuntu server 15.10 inside hyper-v (php 5.6, mysql 5.7, nginx 1.9.3, joomla 3.5) is available on the internet behind cloudflare
After a failed backup of a running VM using Export-VM -Name "UbuntuServer" -Path "F :\tmp"" The original virtual machine that I copied started crashing, first mysql crashed, then after a reboot it cursed at file system errors, but fsck couldn't start, didn't respond to keystrokes in the console, and after shutdown it didn't start at all - a dark screen no error messages Overwrote the original virtual disk with the copied one - it started, but a message about invalid redirection began to appear.
Moreover, if earlier domain.ru was opened, now the redirection is incorrect, but www.domain.ru is accessible from the external network, and 192.168.1.16 from the internal one.
server
server {
listen 80;
server_name 192.168.1.6 domain.ru www.domain.ru;
access_log /var/log/nginx/domain-access.log main;
error_log /var/log/nginx/domain-error.log;
server_name_in_redirect off;
# rewrite ^([^.\?]*[^/])$ $1/ permanent;
large_client_header_buffers 4 81920; #Fix for largest URI
etag on;
expires 3d;
if ($host ~ !^(domain.ru|www.domain.ru)$) {
rewrite ^http://www.domain.ru$request_uri? permanent;
}
Prompt, to make accessible both with www and without it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Zuev, 2016-04-10
@dygger1

Here in config
A above
That is 192.168.1. 6 and 192.168.1. 16
Typo?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question