Java Jive
2024-12-03 22:54:39 UTC
In previous versions of Ubuntu, I had the following working arrangement
for defining localhost subdomains as follows ...
/etc/hosts:
127.0.0.1 localhost
127.0.0.2 local.localhost
127.0.0.3 publish.localhost
Note: In what follows, the files given below are links to files actually
in the sister directory sites-available, as per Apache standard
practice. Further, I've removed all the comments and blank lines to
save space.
/etc/apache2/sites-enabled/001-localhost.conf
<Directory "/home/www">
AllowOverride All
Require all granted
</Directory>
/etc/apache2/sites-enabled/002-local.conf
<VirtualHost 127.0.0.2>
ServerName local.localhost
DocumentRoot "/home/www/Local"
<Directory "/home/www/Local">
Options +Includes +Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/home/www/Local/cgi-bin">
Options +ExecCGI
</Directory>
<Directory "/home/www/Local/Resources/Includes">
Options +ExecCGI
</Directory>
</VirtualHost>
/etc/apache2/sites-enabled/003-publish.conf
<VirtualHost 127.0.0.3>
ServerName publish.localhost
DocumentRoot "/home/www/Publish"
<Directory "/home/www/Publish">
Options +Includes +Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/home/www/Publish/cgi-bin">
Options +ExecCGI
</Directory>
<Directory "/home/www/Publish/Resources/Includes">
Options +ExecCGI
</Directory>
</VirtualHost>
... however since upgrading from Ubuntu 18 to 22, the subdomains don't
load, giving a 404, and the following sorts of entries are found in ...
/var/log/apache2/other_vhosts_access.log
publish.localhost:80 127.0.0.1 - - [03/Dec/2024:19:15:19 +0000] "GET /
HTTP/1.1" 301 568 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:129.0)
Gecko/20100101 Firefox/129.0"
local.localhost:80 127.0.0.1 - - [03/Dec/2024:19:22:21 +0000] "GET /
HTTP/1.1" 301 574 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:129.0)
Gecko/20100101 Firefox/129.0"
[etc]
... showing I think that the translation of, for example, ...
local.localhost -> 127.0.0.2
... is no longer occurring. Indeed, when I attempt to load the pages by
specifying the IP address directly, they all load. I suspect that this
has something to do with IP6, but do not know how to prove this or make
further progress. Can anyone give me some pointers?
for defining localhost subdomains as follows ...
/etc/hosts:
127.0.0.1 localhost
127.0.0.2 local.localhost
127.0.0.3 publish.localhost
Note: In what follows, the files given below are links to files actually
in the sister directory sites-available, as per Apache standard
practice. Further, I've removed all the comments and blank lines to
save space.
/etc/apache2/sites-enabled/001-localhost.conf
<Directory "/home/www">
AllowOverride All
Require all granted
</Directory>
/etc/apache2/sites-enabled/002-local.conf
<VirtualHost 127.0.0.2>
ServerName local.localhost
DocumentRoot "/home/www/Local"
<Directory "/home/www/Local">
Options +Includes +Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/home/www/Local/cgi-bin">
Options +ExecCGI
</Directory>
<Directory "/home/www/Local/Resources/Includes">
Options +ExecCGI
</Directory>
</VirtualHost>
/etc/apache2/sites-enabled/003-publish.conf
<VirtualHost 127.0.0.3>
ServerName publish.localhost
DocumentRoot "/home/www/Publish"
<Directory "/home/www/Publish">
Options +Includes +Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/home/www/Publish/cgi-bin">
Options +ExecCGI
</Directory>
<Directory "/home/www/Publish/Resources/Includes">
Options +ExecCGI
</Directory>
</VirtualHost>
... however since upgrading from Ubuntu 18 to 22, the subdomains don't
load, giving a 404, and the following sorts of entries are found in ...
/var/log/apache2/other_vhosts_access.log
publish.localhost:80 127.0.0.1 - - [03/Dec/2024:19:15:19 +0000] "GET /
HTTP/1.1" 301 568 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:129.0)
Gecko/20100101 Firefox/129.0"
local.localhost:80 127.0.0.1 - - [03/Dec/2024:19:22:21 +0000] "GET /
HTTP/1.1" 301 574 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:129.0)
Gecko/20100101 Firefox/129.0"
[etc]
... showing I think that the translation of, for example, ...
local.localhost -> 127.0.0.2
... is no longer occurring. Indeed, when I attempt to load the pages by
specifying the IP address directly, they all load. I suspect that this
has something to do with IP6, but do not know how to prove this or make
further progress. Can anyone give me some pointers?
--
Fake news kills!
I may be contacted via the contact address given on my website:
www.macfh.co.uk
Fake news kills!
I may be contacted via the contact address given on my website:
www.macfh.co.uk