Accessing a site through a local network with no DNS

Events happening in the community are now at Drupal community events on www.drupal.org.
Fiable.biz's picture

Hello.

Fiable.biz has a small local network with a router, all computers running with Linux, NFS installed (/var/www/ has been exported), and a local multisite installation of Drupal. Computers have private IP numbers. We don't have any D.N.S..
We can access from one computer to another computer non-Drupal site, through, let's say, http://192.168.1.10/site1 .
But for Drupal sites, it doesn't work. If I go to http://192.168.1.10/exemple, I just get the message:
"Not Found
The requested URL /exemple was not found on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.15 (Mandriva Linux/PREFORK-3.2mdv2010.2) Server at 192.168.1.10 Port 80"
Adding "$sites['192.168.1.10.exemple'] = 'exemple';" or "$sites['192.168.1.10/exemple'] = 'exemple';" to the server's "sites.php" file doesn't help.

Do you have any idea about accessing a Drupal site through a local network with no DNS?

Comments

It could be a few things

skwashd's picture

I'm not exactly sure what your problem is, but it could be a number of things.

Are the machines on the LAN configured to server the sites from multiple IP addresses? such as localhost and their LAN IP address. Can you post an example virtual host configuration for a site?

I'd recommend you start using dnsmasq on your LAN. Either install it on your gateway machine or get a cheap router than can be flashed with OpenWRT and assign a FQDN (and associated wildcard) to each machine on your LAN.

Hosts file?

patrickavella's picture

I might be over simplifying this, but can't you just use /etc/hosts entries to access the drupal websites?

Failing that, why no DNS? bind9 is a little ugly to set up but not too bad over all, and if you have a windows computer on the network, windows DNS management/setup is very easy / gui based.

Half success

Fiable.biz's picture

Thank you very much for your quick answers.

We don't have any DNS because our very small network (4 computers) doesn't have any fully qualified domain name. I don't think we need one, and I even don't think we could have one because our, bad, ISP doesn't even provide us with a public IP number. (On the top of that, their server's IP number is in several blacklists, so I have to use a proxy even to read Drupal.org. If I go directly, I get "Sorry, 27.123.213.11 has been blacklisted by http:BL.". Unfortunately, we don't have a large choice of ISPs here.)

At least one Drupal website is accessible from another PC thanks to /etc/hosts, at an address like "http://exemple". I'll try the other ones soon. The small problem is that we have on different PCs different versions of the same sites with the same names.

The access by IP number still doesn't work.

We installed Drupal according to http://drupal.org/node/1114158 , but we didn't understand the meaning of everything in it. Our virtual host configurations are like
<VirtualHost *:80>
DocumentRoot /var/www/drupal7
ServerName exemple
</VirtualHost>
for Ubuntu 10 or 11: in /etc/apache2/sites-enabled/drupal7,
for Mandriva Linux 2010: in /etc/httpd/conf/vhosts.d/00_default_vhosts.conf
Is this correct?
Would <VirtualHost 192.168.1.*:80> restrict the access to our local network?

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: