K
K
kurono2014-01-08 19:55:37
Search Engine Optimization
kurono, 2014-01-08 19:55:37

Is it possible to create 2 different sites on domains: site.ru and www.site.ru?

There is a domain: site.ru and subdomain www.site.ru. Is it possible to host 2 different sites on them? How to do it? Thanks for answers.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
max_rip, 2014-01-08
@max_rip

It is possible but not necessary, PS now such sites are automatically glued together and may not understand you +)

E
egor_nullptr, 2014-01-08
@egor_nullptr

Can.
Example for nginx:

server {
  listen 80;
  server_name site.ru;
  root /var/www/site.ru;
}
server {
  listen 80;
  server_name www.site.ru;
  root /var/www/www.site.ru;
}

F
friogenn, 2014-01-08
@friogenn

Can.
Example for apache:

<virtualhost *:80>
    ServerName site.ru
    DocumentRoot /path/site.ru
</virtualhost>
<virtualhost *:80>
    ServerName www.site.ru
    DocumentRoot /path/www.site.ru
</virtualhost>

Example for dns:
@ A ip_1_сервера
www A ip_2_сервера

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question