I am trying to set up a good web-development system on one of my home computers. I do not have home internet access. I almost exclusively use XAMPP for Linux as my server "stack", especially since it can all be installed from one file (Bitnami installers ROCK!

I want to try to simulate a server environment somewhat similar to a web-hosting server (which means multiple domains, website, etc. hosted on one machine).
I am very well versed in the Apache config files and howto's of them. I am also very familiar with the role of the local "hosts." file, and its role in being the first step in resolving domain names to IP address before any of the online DNS's are queried.
My problem:
It seems that I can not access any of the created virtual domains on my machine, but instead see the web browser try to search for it online (which results in a "Not Found" error). I have concluded, by process of elimination, that it is not from the browser (FireFox), not from XAMPP (this works well on other distros without headache). This problem of not honoring my hosts file, and not locally resolving the virtual domains to their assigned IP addresses on my machine is common on SolydX versions 8 and 9. Most other other distros I have played with, seem to not have this problem (even with exactly the SAME settings in the hosts file - and - in Apache's config files).



If I can not get virtual domains to work, and be addressable with SolydX, this reduces the usability of the operating system for my web-design projects, AND learning about how web-servers work. (Projects like these, are how I teach myself these technical skills.)
My sample hosts file:
Code: Select all
#<ip-address> <hostname.domain.org> <hostname>
#127.0.0.1 localhost.localdomain.org localhost
127.0.0.1 localhost
127.0.1.1 web-host1
127.0.2.1 web-host2
# 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
Code: Select all
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "/opt/lampp/htdocs"
ServerName localhost
ServerAlias localhost.localdomain.org
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
</VirtualHost>
<VirtualHost 127.0.1.1>
ServerAdmin webmaster@web-host1
DocumentRoot "/home/web-host1/htdocs"
ServerName web-host1
ServerAlias web-host1.localdomain.org
ErrorLog "/home/web-host1/logs/error.log"
CustomLog "/home/web-host1/logs/access.log" common
</VirtualHost>
<VirtualHost 127.0.2.1>
ServerAdmin webmaster@web-host2
DocumentRoot "/home/web-host2/htdocs"
ServerName web-host2
ServerAlias web-host2.localdomain.org
ErrorLog "/home/web-host2/logs/error.log"
CustomLog "/home/web-host2/logs/access.log" common
</VirtualHost>
* * *

I do not want to be reliant on accessing the other "virtual sites" by having to type in their IP addresses in the browser's address bar, instead of their assigned virtual domain names.
Again,
I have found this only to be a problem with SolydX, and not any of the other Debian Linux distros I have played with.

I have also not found anything online (via Google or otherwise) that addresses this problem with SolydX? ? ?

My question:
What system setting(s)/configuration(s) do I need to change, in order to get virtual domain names to work as it should, like it normally does on other distros (operating systems, and such)?


