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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
03-16-2006, 09:19 PM
|
#1
|
LQ Newbie
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19
Rep:
|
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!
|
|
|
03-16-2006, 10:51 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep:
|
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
|
|
|
03-17-2006, 02:01 AM
|
#3
|
LQ Newbie
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19
Original Poster
Rep:
|
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.
|
|
|
03-17-2006, 02:52 AM
|
#4
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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).
|
|
|
03-17-2006, 10:55 AM
|
#5
|
LQ Newbie
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19
Original Poster
Rep:
|
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!
|
|
|
03-17-2006, 01:18 PM
|
#6
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep:
|
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.
|
|
|
03-17-2006, 05:24 PM
|
#7
|
LQ Newbie
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19
Original Poster
Rep:
|
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.
|
|
|
03-17-2006, 05:41 PM
|
#8
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
03-17-2006, 05:49 PM
|
#9
|
LQ Newbie
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19
Original Poster
Rep:
|
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
|
|
|
03-17-2006, 05:50 PM
|
#10
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
Ok, run this command to confirm Apache is listening on the port you think it is:
$ netstat -a | grep 8080
Peace...
|
|
|
03-17-2006, 05:55 PM
|
#11
|
LQ Newbie
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19
Original Poster
Rep:
|
I did that, and I got no output, It just went to the next line as if I had just pressed 'Enter'
|
|
|
03-17-2006, 06:16 PM
|
#12
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
03-17-2006, 10:16 PM
|
#13
|
LQ Newbie
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19
Original Poster
Rep:
|
There was no reference to http, and httpd.conf is configured to listen on I don't see what the problem could be, I don't know why netstat isn't showing that..
|
|
|
03-17-2006, 10:42 PM
|
#14
|
Member
Registered: Dec 2005
Posts: 77
Rep:
|
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.
|
|
|
03-17-2006, 11:00 PM
|
#15
|
LQ Newbie
Registered: Mar 2006
Distribution: CentOS 4.2
Posts: 19
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|