J
J
JoraMajora612017-03-16 23:08:27
Computer networks
JoraMajora61, 2017-03-16 23:08:27

Why does the wrong site open when navigating through a domain?

Hello.

Please tell me, I've already tried everything.

There is a server on which there is a directory with site files (let's call it 777), there are also directories with sites nearby on the server.
I have a domain, I registered the ip of the server for it, and registered the domain in the site conf file 777, restarted Apache.

Bottom line: the domain does not open site 777, but next to it lying in ANOTHER DIRECTORY!

I have already checked everything a hundred times, and restart, reload, reboot on the server does not work.

Tell me what to do, where to dig at least?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ruslan Fedoseev, 2017-03-17
@JoraMajora61

apachectl -S
show

C
CityCat4, 2017-03-17
@CityCat4

In the direction of the concept of "virtual host". If Apache has virtual hosts at all, then it looks up the domain name that was in the request and the domain names it has as virtual hosts. If the name matches, the corresponding host is returned.
If the name does not match, then either the site marked as _default_:80 (or *:80) is given, if there is none, either the root (described in the root config) or the first virtual host.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question