logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: apache2 redirecting randomly
Author
matjash



Joined: 18 Feb 2017
Posts: 2
Location: Nova Gorica

PostPosted: Sat 18 Feb '17 15:44    Post subject: apache2 redirecting randomly Reply with quote

Hi, I'm banging my head with this problem for a couple of days. I have VPS server runing Ubuntu 16.04.1 and apache 2.4.18. Server is meant to host 3 vhosts. For testing purpose I've also created another one that I can share with you since it should only serve a blank page with text Lady. (amarena.migo.si) Problem is that sometimes it shows the correct document root and sometimes the document root vrom 2nd vhost. A couple ctrl+f5 and site changes. I tried to temporary disable all vhost and redirection still take place. The main config apache2.conf has default values and I'm posting one vhost config from the vhost that get randomly redirected to:

Code:
<VirtualHost *:80>
    ServerName catalogue.contestdream.com
    #ServerAlias catalogue.contestdream.com
    DocumentRoot /var/catalogue.contestdream.com/public

    <Directory /var/catalogue.contestdream.com/ >
      Options -Indexes
      AllowOverride All
      Require all granted
      DirectoryIndex index.php
    </Directory>


</VirtualHost>


apache2ctl -S output is following:


Code:
VirtualHost configuration:
*:80                   is a NameVirtualHost
         default server 54.161.248.169 (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost 54.161.248.169 (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost catalogue.contestdream.com (/etc/apache2/sites-enabled/catalogue.contestdream.com.conf:1)
         port 80 namevhost www.enkronos.com (/etc/apache2/sites-enabled/enkronos.com-http.conf:1)
                 alias enkronos.com
         port 80 namevhost www.ladyamarena.it (/etc/apache2/sites-enabled/ladyamarena.it-http.conf:1)
                 alias ladyamarena.it
         port 80 namevhost amarena.migo.si (/etc/apache2/sites-enabled/test.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 18 Feb '17 22:02    Post subject: Reply with quote

I can't duplicate, maybe someone else here can but

Quote:
A couple ctrl+f5 and site changes. I tried to temporary disable all vhost and redirection still take place.


Try emptying the browser cache.
Back to top
matjash



Joined: 18 Feb 2017
Posts: 2
Location: Nova Gorica

PostPosted: Sat 18 Feb '17 22:06    Post subject: Reply with quote

Confused After 2 days of breaking my head on this i did server reboot and problem went away. [/b]
Back to top
steveoriol



Joined: 25 Oct 2017
Posts: 1

PostPosted: Wed 25 Oct '17 12:48    Post subject: Reply with quote

Very Happy Thank you very much matjash, I also spen 2 days of breaking my head on this same problem.
after an "sudo reboot"
the vitualhost is back to nomal Very Happy
Back to top


Reply to topic   Topic: apache2 redirecting randomly View previous topic :: View next topic
Post new topic   Forum Index -> Apache