LinuxQuestions.org
Help answer threads with 0 replies.
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 03-16-2006, 09:19 PM   #1
adnonimape
LQ Newbie
 
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19

Rep: Reputation: 0
Apache Problem, NEED HELP!


Ok, I am learning linux, and I wanted to run a network website, and perhaps one for online.

Apache wouldnt start at first, because of a couple of errors in the httpd.conf file, and i corrected those, and I am now stumped as what to do.

I am fairly new to linux, and I would like to learn more, which is why im here, and 'fooling' around with linux.

I am using CentOS 4.2.

This is the error i get when doing ./httpd restart


Starting httpd: [Thu Mar 16 22:11:43 2006] [error] (EAI 2)Name or service not known: Failed to resolve server name for 192.168.1.100 (check DNS) -- or specify an explicit ServerName
[ OK ]



I do not know where to look, or what to look at, what to adjust, or do. Please help! =)

Thank you!
 
Old 03-16-2006, 10:51 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I assume that you have a domain name that you want people to type into their browser to see your web site. Is that domain name registered in DNS and does it point to your web server (and does your web server use the same DNS)?

If your domain name is www.somedomain.com, what happens when you type the following from a terminal window on the web server:
Code:
ping www.somedomain.com
 
Old 03-17-2006, 02:01 AM   #3
adnonimape
LQ Newbie
 
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19

Original Poster
Rep: Reputation: 0
No, I don't have a domain for it. It's just a network computer. The ip of it is 192.168.1.105. If I ping my computer from it, i get .277ms. So it is on the network, and recognizes it. It just gives me that error.

I've run apache off of windows before, and I got it to work fine just by typing http://x.x.x.x I didn't need to have a domain for it.

Last edited by adnonimape; 03-17-2006 at 02:11 AM.
 
Old 03-17-2006, 02:52 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
As the error message suggest, you'll need a hostname (either looked up via DNS or in /etc/hosts) that matches your IP address or a ServerName directive in httpd.conf (to "force" the server name into something else than you're host's real name).
 
Old 03-17-2006, 10:55 AM   #5
adnonimape
LQ Newbie
 
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19

Original Poster
Rep: Reputation: 0
The directory /etc/hosts/ doesn't exist.

Also, I don't really get what you're saying (I am fairly new to linux, and apache), but im learning =)

Thanks for your help!
 
Old 03-17-2006, 01:18 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Since you're using an IP address to access the web server instead of a domain name, I'd say the easiest ways to stop that error are:

1. Add an entry to your /etc/hosts file for your IP address so that Apache can determine a server name for itself. For example:
Code:
127.0.0.1      localhost.localdomain    localhost
192.168.1.105  somehost.somedomain.com  somehost
or

2. Uncomment the ServerName in httpd.conf and give it a server name.

Neither of these methods will make the web server available by name (well, the first one might if you add the name to your other PCs hosts files) but it should make the error go away.
 
Old 03-17-2006, 05:24 PM   #7
adnonimape
LQ Newbie
 
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19

Original Poster
Rep: Reputation: 0
Ok, thank you. That got rid of all the errors when stopping/starting apache. But I still cannot access it via a web browser. I try 192.168.1.105:8080 and it seems to not work. I have the httpd.conf file set to listen on port 8080 as well. But it still does not seem to work. From any network computer.
 
Old 03-17-2006, 05:41 PM   #8
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Do you get any messages in the browser when you try to access your web server? Also, check the error_log for any messages.

Peace...
 
Old 03-17-2006, 05:49 PM   #9
adnonimape
LQ Newbie
 
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19

Original Poster
Rep: Reputation: 0
This is the last entries in the error_log, from my last restart that outputted no errors. In my browser, I just get a Page Cannot Be Found thing. Here is the error_log:
Code:
[Fri Mar 17 18:25:11 2006] [notice] caught SIGTERM, shutting down
[Fri Mar 17 18:25:14 2006] [notice] core dump file size limit raised to 4294967295 bytes
[Fri Mar 17 18:25:15 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Mar 17 18:25:18 2006] [notice] Digest: generating secret for digest authentication ...
[Fri Mar 17 18:25:18 2006] [notice] Digest: done
[Fri Mar 17 18:25:18 2006] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Fri Mar 17 18:25:18 2006] [notice] LDAP: SSL support unavailable
[Fri Mar 17 18:25:19 2006] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
[Fri Mar 17 18:25:20 2006] [notice] Apache/2.0.52 (CentOS) configured -- resuming normal operations
 
Old 03-17-2006, 05:50 PM   #10
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Ok, run this command to confirm Apache is listening on the port you think it is:

$ netstat -a | grep 8080

Peace...
 
Old 03-17-2006, 05:55 PM   #11
adnonimape
LQ Newbie
 
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19

Original Poster
Rep: Reputation: 0
I did that, and I got no output, It just went to the next line as if I had just pressed 'Enter'
 
Old 03-17-2006, 06:16 PM   #12
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Ok, that means Apache is NOT listening on port 8080. Run this command:

$ netstat -a | more

and see if you can find a reference to port 80 or "http". Also, look in the httpd.conf file to see what port Apache is configured to listen on.

Peace...
 
Old 03-17-2006, 10:16 PM   #13
adnonimape
LQ Newbie
 
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19

Original Poster
Rep: Reputation: 0
There was no reference to http, and httpd.conf is configured to listen on
Code:
*:8080
I don't see what the problem could be, I don't know why netstat isn't showing that..
 
Old 03-17-2006, 10:42 PM   #14
shaunw
Member
 
Registered: Dec 2005
Posts: 77

Rep: Reputation: 15
Smile Accessing your network webserver

Are you running a firewall. If so you need to enter apache into
the firewall. How you do this depends upon your linux
distribution.
 
Old 03-17-2006, 11:00 PM   #15
adnonimape
LQ Newbie
 
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19

Original Poster
Rep: Reputation: 0
Its CentOS 4.2, and I think when I was installing it, I chose for it to install the firewall, how would I go about removing, or disabling it?

I can access http://192.168.1.105:8080 from the machine the webserver is on, but from other network computers, I cannot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Strange apache trailing / problem - Slack-current, apache 1.3.33 vamp Linux - Networking 1 01-30-2005 07:28 PM
Apache problem Xsecrets Linux - Networking 5 03-21-2004 03:49 PM
RH9: PHP session problem (or Apache problem) fengcn Red Hat 0 12-01-2003 06:32 PM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM

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

All times are GMT -5. The time now is 09:34 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