Debian/Ubuntu-Creating a subdomain to VPS server Ubuntu

Yes apache2, quietly understand.

The site lies in the directory/var/www/-site.ru everything works, the site for dle.
Subdomain I created in the same folder as/var/www/sub-and upload it there site.ru another site on Html.

And here is the sequence

Added to the hosts file:

Code: select all code

127.0.0.1 localhost
192.168.0.2 ubuntu
127.0.0.2 edsr. localhost

# The following lines are is desirable for IPv6 capable hosts
: 1 ip6-localhost ip6-loopback
f900:0 ip6-localnet
FF00:0 ip6-mcastprefix
FF02::2 ip6-allnodes 1
FF02::1:2 ip6-allrouters

Created the file httpd-vhosts.conf:

Code: select all code

NameVirtualHost *: 80
< VirtualHost *: 80 >
Serveradmin adshme@yandex.ru
DocumentRoot “C:/Users/andre/Documents/YandexDrive/NetBeansProjects/edsr”
Servername localhost
ServerAlias localhost

Errorlog “logs/localhost.log”
CustomLog “logs/localhost.log” common

< VirtualHost *: 80 >
Serveradmin adshme@yandex.ru
DocumentRoot “C:/Users/andre/Documents/YandexDrive/NetBeansProjects/edsr_parser”
Servername edsr. localhost
Edsr. Serveralias localhost

Errorlog “logs/localhost.log”
CustomLog “logs/localhost.log” common

Added entry in httpd.conf file:

Code: select all code

Include conf/extra/httpd-vhosts.conf

Leave a Reply

Your email address will not be published. Required fields are marked *