[K12OSN] where is "localhost" pulling from
Bimal Pandit
bimal.pandit at indoasian.com
Tue Feb 1 04:40:22 UTC 2005
Dear Robert Lefebvre,
------------ SNIP --------------
I thank everyone that assisted getting my mysql, apache, php started.
I finally installed Xampp and it to. I hate it when installs go bad
because I get confused, and forget what did what and when, but before
I installed Xampp http://localhost in the browser would pull up a
page. I think this was from Installing apache by itself. Whatever
script it was instructed to replace the page with an html page that
said "go away" (for security in other words). So now I've installed
Xampp, the install went great, and with a terminal query I have
determined that all are running. Unfortuanately a call to localhost
gets me the same page as before (the "go away" page) and none of the
new pages are showing. I can't find them in the file tree, are AMP
files hidden?
------------ SNIP --------------
in fact localhost is name for loop back ip address of the local machine
i.e. 127.0.0.1 and is always(see /etc/hosts). Now here in your case it
is same for the apache web server as it is local for that, in case if
want to use IP or name for your URL address you need either an entry in
/etc/hosts or a DNS server.
here is both of these, choose what you like as :-
here i will define my URL as hello-bimal.com so you need to change
accordingly with your ip address as here i have taken 192.168.0.1
1) in /etc/hosts do as
----------------------
192.168.0.1 hello-bimal.com
2)DNS server
------------
This will do for hello-bimal.com, reverse and forward lookup
vi /etc/named.conf
zone "hello-bimal.com" IN {
type master;
file "forward_hello-bimal";
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "backward_hello-bimal";
allow-update { none; };
};
vi /var/named/forward_hello-bimal
$TTL 86400
@ IN SOA hello-bimal.com. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS 192.168.0.1
@ IN A 192.168.0.1
vi /var/named/backward_hello-bimal
$TTL 86400
@ IN SOA hello-bimal.com. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS 192.168.0.1
1 IN PTR hello-bimal.com.
NOTE:- 1) and don't forget to start/restart the DNS server
2) also this is a basic configuration and in case you want a
stronger DNS server you need to see available parameters, and values
according to your requirement.
3) you also need to change "ServerName 192.168.0.1" in httpd.conf
file, start/restart the Web server
now you can access your webserver as http://hello-bimal.com
hope this will help a bit.
regards,
Bimal Pandit
bimal.pandit at indoasian.com
More information about the K12OSN
mailing list