0

Let's say I have domains xyz.com, abc.com and a server with iRedMail (a mail server application) - for example it's IP address is 1.2.3.4.

The address https://xyz.com/mail is redirecting to iRedMail login page - and that's ok.

In DNS I have A-type redirect from abc.com to 1.2.3.4 server.

In the server I added a abc.com domain rule in apache2 configuration.

Sadly when I type http://abc.com in a browser, the browser redirect me to https://xyz.com/mail. But the browser should show me a file from a specific folder (defined in apache2 config).

How can I fix it?

Simon
  • 1,099
  • 1
  • 11
  • 29
  • try virtual hosts: https://httpd.apache.org/docs/current/vhosts/examples.html#purename –  Apr 03 '16 at 19:27
  • I've created virtual host for abc.com domain. It's contains everything what is in your link. I think I should edit xyz.com virtual host, but I don't know how – Simon Apr 03 '16 at 19:32
  • there is a tutorial : https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts After setting up files you enable each virtualhost. It is also told in the tutorial. –  Apr 03 '16 at 19:51

1 Answers1

0

the default index.html file will have been replaced by a similar file with a line of html code inside it to redirect any requests to abc.com -> abc.com/mail.

just remove index.html and you'll be fine.

hp cre
  • 1
  • 1