Re: accessing localhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2004-01-11 at 23:33, redhat wrote:
> William Hooper wrote: 
> > Craig White said:
> > [major trimage]
> >   
> > > > My hosts file starts out as:
> > > > 
> > > > 127.0.0.1    localhost
> > > > 127.0.0.1    localhost.localdomain    localhost
> > > > 127.0.0.1    lokrin.com    lokrin
> > > >       
> > > ---
> > > AFAIK - the right way to do this would be...
> > > 127.0.0.1	localhost.localdomain	localhost
> > > ip_eth_0_or_1   lokrin.lokrin.com       lokrin
> > > 
> > > # no reason that I can think of to otherwise name the loopback device at
> > > all.
> > >     
> > It helps if you are on DHCP, and IIRC is the default setup.
> > 
> > On the other hand, it is the default setup all on one line.
> > 
> > 127.0.0.1     localhost.localdomain localhost lokrin.lokrin.com lokrin
> > 
> > I don't know how multiple lines would react.  Also assuming the OP has
> > lokrin.com registered...
> > 
> >   
> Ok, I added
> 
> 127.0.0.1     localhost.localdomain localhost lokrin.lokrin.com lokrin
> 
> and
> 
> 127.0.0.1	localhost.localdomain	localhost
> ip_eth_0_or_1   lokrin.lokrin.com       lokrin
> still no change
> 
> as for DHCP and IIRC and OP (?) - - -
> 
> I only want to call the site up from the same computer that the site
> is on.  I don't want anyone on the net to be able to call it up.  My
> computer domain is set up for lokrin.com.  My REAL website is at
> lokrin.net.  I want to be able to work the site code locally and see
> what happens (when I make mistakes).
> 
> What gets me is that I was able to do it. Now I can't.
> 
> Also, it says I don't have permission to access "/" .  Does this mean
> it is trying to access my root directory rather than my site
> directory, which according to webmin is:
> 
> Virtual Servers
>                  
>           Default Server
> Defines the default settings for
> all other virtual servers, and
> processes any unhandled requests.
> Address Any
> Port Any
> Server Name
> Lokrin
> Document Root
> /var/www/html   
> (default)
>                  
>           Virtual Server
> Handles the name-based server on
> all addresses
> Address Any
> Port Any
> Server Name
> Lokrin                              (path same as hosted site)
> Document Root
> /home/lokrin/www/www
>                  
>           Virtual Server
> Processes all requests on port 443
> not handled by other virtual
> servers.
> Address Any
> Port 443
> Server Name
> new.host.name:443
> Document Root
> /var/www/html            (default)
> 
> And the site IS located in both places.  I need to set a link to
> redirect /var/www/html to the /home/lokrin/www/www sometime later....
----
1 - I meant for you to substitute the ip address for eth0 or eth1 or
whatever the LAN ip address was for the second line in /etc/hosts - not
put it in literally. If that ip address is assigned by DHCP that is a
mistake since running servers is always tough when you can't access them
by ip (forgetting for the moment ddns)

2 - My experience with webmin and the apache module is that it is
helpful when you understand apache setup and confusing when you don't.
Anyway...

you can always use an apache directive...
       Alias /horde/ /var/www/html/horde/

to redirect

or in your case, I would prefer to keep the html in the /var/www/html
tree and put a link from your home directory to there

ln -s /var/www/html /home/lokrin/www/www
but of course, you would have to move the contents of
/home/lokrin/www/www to /var/www/html first

or the way you are trying to do things...
ln -s /home/lokrin/www/www /var/www/html/www

The important thing...first and foremost is that you can access via dns
or host resolution...

ping localhost
ping lokrin

if these don't work, apache ain't gonna work.

Craig


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux