Добрый день
машина расположена за роутером
ОС Ubuntu 18.04.3 LTS
сервер apach2
статичный ip от провайдера 123.123.123.123
в локальной сети за машиной закреплен ip 192.168.0.123
есть домен example.com
два субдомена test.example.com
test2.example.com
ресурсные записи A @ и субдоменов перенесены на домашнюю машину
созданы соответствующие каталоги
/home/example.com
/home/test.example.com
/home/test2.example.com
созадны виртуальные сервера для домена и двух субдоменов
при любом из запросов (test.example.com, test2.example.com) идет перенаправление на основной домен (example.com)
конфиги
000-default
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /home/
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
example.com
<VirtualHost example.com:80>
DocumentRoot /home/example.com
<Directory /home/example.com>
allow from all
Options None
Require all granted
</Directory>
ServerName example.com
</VirtualHost>
test.example.com
<VirtualHost test.example.com:80>
DocumentRoot /home/test.example.com
ServerName test.example.com
<Directory /home/test.example.com>
allow from all
Options None
Require all granted
</Directory>
UseCanonicalName off
</VirtualHost>
apache2ctl configtest
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using fd01::62a4:4cff:fe3c:76b3. Set the 'ServerName' directive globally to suppress this message
Syntax OK
apache2ctl graceful
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using fd01::62a4:4cff:fe3c:76b3. Set the 'ServerName' directive globally to suppress this message
httpd not running, trying to start
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'graceful' failed.
The Apache error log may have more information.
error.log
[Sat Nov 02 22:33:29.934030 2019] [rewrite:error] [pid 8217] [client 123.123.123.123:37649] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /home/example.com/