LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-17-2006, 05:05 AM   #1
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Rep: Reputation: 30
apache question


i m able to access my webpags with http://192.*.*.*/index.html but i could not access them with my server name as http://mylinux.com/index.html why so ?
 
Old 06-17-2006, 07:26 AM   #2
vls
Member
 
Registered: Jan 2005
Location: The grassy knoll
Distribution: Slackware,Debian
Posts: 192

Rep: Reputation: 31
You need to put your hostname/ip in /etc/hosts to get a name resolved.

Code:
hostname 192.168.0.1
Or you could set up a DNS server. But that's overkill, IMHO.
 
Old 06-19-2006, 01:19 AM   #3
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Original Poster
Rep: Reputation: 30
sorry. but ur solution could not solve my problem..!
 
Old 06-19-2006, 01:28 AM   #4
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
put this line in your own /etc/hosts file
mylinux.com 192.*.*.*

replace 192.*.*.* with your server's ip.
 
Old 06-19-2006, 05:29 AM   #5
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Original Poster
Rep: Reputation: 30
sorry did'nt work..!
 
Old 06-19-2006, 05:34 AM   #6
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
what error does your browser shows? and instead of saying sorry didn't work! like a child you can tell us what you tried and how you are doing it. you can post the content of your /etc/hosts file. we even don't know what os you are using. don't waste our time and if you really want to solve your problem you should come openly here. there's no need to hide your ip 'coz its a private ip and not unique to you.
 
Old 06-19-2006, 07:11 AM   #7
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Original Poster
Rep: Reputation: 30
prozac,
thanx guiding me. below is output of my hosts file. i m using redhat AS 4 server.
browser giving error :- the connection was refused when connection to sdlamonitor.com

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 mon.sdlamonitor.com mon localhost.localdomain localhost
sdlamonitor.com 192.168.123.6
 
Old 06-19-2006, 07:15 AM   #8
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
ok now we know. just swap the hostname with ip in /etc/hosts and see if that solves your problem.
Quote:
192.168.123.6 sdlamonitor.com
 
Old 06-19-2006, 07:18 AM   #9
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
and you don't have to type /index.html at the end just typing the host name is enough.
 
Old 06-19-2006, 10:58 PM   #10
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Original Poster
Rep: Reputation: 30
i setup my host file as u suggested but when i type htpp://sdlamonitor.com in browser it says that www.sdlamonitor.com could not found please check the name n tyr again.

my system full name is:-mon.sdlamonitor.com
apache nameserver:-sdlamonitor.com

what may be the reason..?
 
Old 06-19-2006, 11:31 PM   #11
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
sdlamonitor.com is your domain name and not hostname. change the server hostname to something like web.sdlamonitor.com in your hosts file.

Code:
192.168.123.6 web.sdlamonitor.com
then point your browser to web.sdlamonitor.com
 
Old 06-20-2006, 02:19 AM   #12
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Original Poster
Rep: Reputation: 30
Thanx all of u , you solved my problem.
 
Old 06-20-2006, 03:26 AM   #13
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
glad it worked out for you.
 
Old 06-20-2006, 05:25 AM   #14
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Original Poster
Rep: Reputation: 30
it worked but it gets removed from hosts file automatically. why so ? i hv to configure it manually again n again.

192.*.*.* web.sdlamonitor.com
 
Old 06-20-2006, 05:39 AM   #15
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
it shouldn't. IMO the hosts file shouldn't get changed like that. When do you find out its removed?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Question Verbal Kint Linux - Software 4 09-28-2005 12:20 PM
Apache Question LiNuXn00biE_2.4 Linux - Newbie 4 11-02-2004 04:27 PM
Apache 2.0 question subzero80 Linux - Networking 1 10-10-2003 11:54 AM
Apache question burt Linux - Software 5 10-30-2002 12:41 PM
Apache question george3k Linux - General 9 07-16-2001 06:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration