M
M
Mark Rosenthal2014-10-02 12:55:53
Apache HTTP Server
Mark Rosenthal, 2014-10-02 12:55:53

How to set up two websites on one VPS?

There is a VPS with Apache, domain.ru and subdomain.domen.ru, how can I set up two sites?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseniy Togulev, 2014-10-02
@tetra

uncomment in apache config

# Use name-based virtual hosting.
#
NameVirtualHost *:8080

well, or port 80
and beyond
<VirtualHost *:8080>
ServerAdmin [email protected]домен.ру
DocumentRoot "/home/домен.ру/www"
ServerName домен.ру
ErrorLog /home/домен.ру/www/error.log
<Directory "/home/домен.ру/www">
allow from all
 AllowOverride All
Options +Indexes
</Directory>
</VirtualHost>

<VirtualHost *:8080>
ServerAdmin [email protected]поддомен.домен.ру
DocumentRoot "/home/поддомен.домен.ру/www"
ServerName поддомен.домен.ру
ErrorLog /home/поддомен.домен.ру/www/error.log
<Directory "/home/поддомен.домен.ру/www">
allow from all
 AllowOverride All
Options +Indexes
</Directory>
</VirtualHost>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question