нужна помощь коллективного разума smile
есть сайт , допустим site.com (www.site.com и site.com оба работают одинаково)
нужно создать сабдомен test.site.com
что было сделано:
1) в /etc/hosts добавлена запись:
было
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
стало
127.0.0.1 localhost
127.0.0.1 test.localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
2) в /etc/apache2/sites-available добавлен новый хост subdomain :
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName test.site.com
DocumentRoot /home/public_html/magento2
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/public_html/magento2>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
работающий default:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/public_html/magento
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/public_html/magento>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
3) httpd.conf добавлено /home/public_html/magento2:
<Directory /home/public_html/magento>
AllowOverride All
</Directory>
<Directory /home/public_html/magento2>
AllowOverride All
</Directory>
4) apache stop, a2ensite subdomain, apache start ==> OK, появилась запись в /etc/apache2/sites-enabled/
при обращении к test.site.com никакой реакции, в логах в том числе :rolleyes: