Samba access or Apache server?

Stephen L Arnold arnold.steve at ensco.com
Wed May 26 20:56:10 GMT 1999


When the world was young, Jeff Williamson <jwilli at abitasprings.com> 
and Steve Fosdick <steve.fosdick at aom.bt.co.uk> carved some runes 
like this:  

> Jeff Williamson wrote:
> 
> > Steve-thanks for the advice.
> > I've changed my hostname on the 95 box from "95" to "win" but
> > the problem persists. The Apache server is of course running
> > on the Linux box.
> 
> > There is a trade-off here; either I have Samba access from my
> > win95 box to the Linux machine, or I can access Apache-but not
> > both. The way to change it is by including or omitting the
> > reference to the Linux box in /etc/hosts.
> 
> > Is this a bug?

>From my (albeit limited) experience with linux, samba, and apache 
it looks much more like a configuration issue than a bug (you are 
using one of the later versions of apache, right?).  I had a few 
adventures trying to compile/configure samba and apache the first 
couple times...

[snip]
> 
> 1.  Do you have the DNS resolver configured for host
>     name lookup (see /etc/resolv.conf).

This is still a home network, right?  And if you're not running 
your own named, then you shouldn't need anything here unless you 
want to use your ISP's domain on your network.  Even if you do, you 
still won't have access to your ISP's DNS machines when you're not 
connected to the outside world.  Since you only have local 
hostnames in /etc/hosts (ie, no FQDNs) resolv.conf is not the 
problem.

> 2.  Does Linux implement a name service switch
>     (/etc/nsswitch.conf) and if so what does it have it in.

Yes it does, and the hosts line from nsswitch.conf (RedHat 4.2, 
kernel 2.0.30) looks like this (and should not need changing):

hosts:      files nisplus nis dns

Obviously, it will look in the local host table first (before 
trying DNS).

> 3.  What error message(s) do you get from the client when apache
>     isn't working properly.

Or more to the point, what exactly are you trying to do that's not 
working?  Have you tried something like http://192.168.1.6 in the 
browser?  If that works (but the hostname doesn't) then you need to 
specify the hostname in one of the apache config files (httpd.conf 
for my version of apache).  The comments are a tad misleading:

# ServerName allows you to set a host name which is sent back to
# clients for your server if it's different than the one the
# program would get (i.e. use "www" instead of the host's real
# name).

ServerName rama

This seems to imply that you don't need to specify this parameter 
unless you want to surf via http://www.domain.org, however, I found 
that Netscape would not resolve the URL (using the actual hostname 
instead of the IP address) unless I specified the real hostname via 
the above parameter.

> 4.  Immediately after an unsuccessful attempt to access apache
>     from a client, what are the last few lines in apache's error
>     log file (usually called error_log under whatever directory
>     apache is installed in.)

Yes, the apache logs should indicate whether this is the problem or 
not.

Hope this helps, Steve

******************************************************************
Stephen L Arnold                      http://www.rain.org/~sarnold
#include <std_disclaimer.h>
******************************************************************


More information about the samba mailing list