I
I
iPumbaza2016-11-01 18:18:30
Apache HTTP Server
iPumbaza, 2016-11-01 18:18:30

How to find the reason for redirecting the main page of a virtual web host to apache2?

Good afternoon, I wish you all good mood!
There is a VPS on Ubuntu-1604-xenial-64-minimal. Installed on it:

  1. PHP 5.6.26-1;
  2. Apache/2.4.18 (Ubuntu);
  3. MySQL 5.7.13-0ubuntu0.16.04.2 - (Ubuntu).

The problem is that the request to my site " example.com " goes into a circular redirect. It is noteworthy that:
  1. Requests such as " example.com/phpmyadmin " and " example.com/administrator " return the correct "index.php". Prior to this, the request " example.com/administrator " went to the "left" domain "salenames.ru/404" (!). I was shocked, because I didn’t understand: is it the domain registrar "example.com" (the domain itself does not belong to me) or some kind of malware? Now I have specified in the host configuration: and it no longer throws DirectoryIndex index.html index.php
    at " https://www.salenames.ru/404 ".
  2. Locally, the site is deployed without problems on OpenServer.
  3. With an empty ".htaccess" we still catch a cyclic redirect.
  4. Adding a line 127.0.0.1 example.comto the "hosts" file does not work.

Virtual host configuration file "/etc/apache2/sites-available/000-default.conf" :
Listen 80
<VirtualHost *:80>
  ServerName example.com
  DirectoryIndex index.html index.php
  ServerAdmin [email protected]
  DocumentRoot /var/www/vhosts/example.com
  ErrorLog /var/www/vhosts/error.log
  CustomLog /var/www/vhosts/access.log combined
</VirtualHost>

"Error.log" says nothing about this. In "Access.log" lines of the form are repeated:
111.111.111.111 - - [01/Nov/2016:15:21:05 +0100] "GET /index.php HTTP/1.1" 303 255 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"

Can you please tell me how can I get out of this loop of redirects of the main page to itself?
Thanks to!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2016-11-02
@opium

delete in xtaccess or php index code 303 redirect

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question