Файл VirtualHost работает только для пользователя localhost, а не для любого ip, будь то общедоступный, частный или собственный.Вот содержимое файла VirtualHost, которое помещено в папку sites-enabled
:
<VirtualHost *:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /home/matecat/cattool
DirectoryIndex index.php index.php3 index.html index.htm index.shtml
<Directory /home/matecat/cattool/>
Options All
AllowOverride All
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
ExpiresActive On
ExpiresByType text/html "access plus 1 hour"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
ExpiresByType image/ico "access plus 1 week"
ExpiresByType application/x-shockwave-flash "access plus 1 week"
</Directory>
php_flag register_globals off
php_flag magic_quotes_gpc off
php_admin_flag short_open_tag on
php_value memory_limit 1024M
php_value upload_max_filesize 200M
php_value post_max_size 200M
LogLevel error
ErrorLog /var/log/apache2/matecat.error.log
CustomLog /var/log/apache2/matecat.log combined
ServerSignature Off
# Configuration for Nodejs proxy
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location /sse/ >
ProxyPass http://0.0.0.0:7788/
ProxyPassReverse http://0.0.0.0:7788/
</Location>
</VirtualHost>
Я закомментировал строки:
Servername localhost
ServerAdmin root@localhost
, но он по-прежнему не работает, используя "IPv4 "системы после перезапуска сервера apache.