Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
|
 |
|
08-23-2005, 08:16 AM
|
#1
|
LQ Newbie
Registered: Aug 2005
Posts: 12
Rep:
|
apache config
Hi guys,
It's a bit long story with my problem, but I'll try to make it short.
I'm kind of new to linux especially to mandrake 9.2 which I have installed just few days ago and trying to set it up as a server. I had already RH 9 before and all was working fine.
Now I've done exactly the same thing with mandrake and everything was ok until now, where I'm lost. It' just happened after rebooting my computer.
I can't see my website anymore as I'm getting message : The connection was refused when attempting to connect to "myserver"
I've checked the httpd.conf file and also I have anotherone there httpd2.conf and I don't know why, but they all look same and everything seems to be ok.
I can ping my pc I can browse the internet, I can do everything but see my website on it.
Can please anyone help, I've spent so much time with this and I don't wanna give up.
Any help would be really great
Thanx
xpace
|
|
|
08-23-2005, 12:35 PM
|
#2
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
It seems that you ve myserver:80 firewalled or apache configs deny access to your website.
If you type this in command-line, what do you see?: `telnet myserver 80`. Replace myserver with your server's real hostname or ip address.
|
|
|
08-23-2005, 04:40 PM
|
#3
|
LQ Newbie
Registered: Aug 2005
Posts: 12
Original Poster
Rep:
|
this is what i get
Trying 192.168.1.99...
telnet: connect to address 192.168.1.99: Connection refused
telnet: Unable to connect to remote host: Connection refused
what do you think and why it hapened just after reboot by itself?
Thanx
xpace
|
|
|
08-23-2005, 05:14 PM
|
#4
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
Ok, here's what I think.
1) You need to find apache's PIDs using `ps -ax`, then use `netstat -na -p inet` to see all IP address/port pairs used by server processes (including apache). Make sure that apache is listening on the desired addess  ort.
2) Read your httpd.conf, is Listen directive defined correctly? That is, did you specify the required adress  ort?
3) Is apache started? Is it setup to start on boot?
4) Check your firewall settings.
Regaring why it happened only after reboot, there are many reasons, one of them is changing httpd.conf w/o restarting apache, but when you'd restart your machine, apache re-read the conf. Same can happen with firewall settings. Another possible reason is, if you have DHCP driven network, you might have just got another IP address after reboot, while you have specified the old IP in your httpd.conf. THere are many more reasons. Let's just try to identify your problem...
|
|
|
08-23-2005, 05:42 PM
|
#5
|
LQ Newbie
Registered: Aug 2005
Posts: 12
Original Poster
Rep:
|
first os all thanks for you time
I've ran all the commands you gave me, but I couldn't find any apache related file listed.
my IP is static and I didn't change anything in httpd.conf file, firewall is off
anyway if you could please have a look at this file www.xpace.sk/apache
the apache is actual file without extension, that's the listing of those 2 commands you gave me and on the end its actual httpd.conf file listed, so if you don't mind please have a look and tell me what's going on
I apreciate it.
thanks
|
|
|
08-23-2005, 08:42 PM
|
#6
|
Member
Registered: Jun 2004
Location: Kansas City, MO
Distribution: Fedora (LXQT)
Posts: 276
Rep:
|
try running
apachectl start
as root, apache may just not be starting automatically, if this works then you can add it to rc.local or somewhere (not sure on mandrake, but somewhere in a rc.d or similar)
|
|
|
08-24-2005, 01:30 AM
|
#7
|
LQ Newbie
Registered: Aug 2005
Posts: 12
Original Poster
Rep:
|
apache is started and also I have restarted it few times
still same stuff
thanks
|
|
|
08-24-2005, 01:36 AM
|
#8
|
LQ Newbie
Registered: Aug 2005
Posts: 12
Original Poster
Rep:
|
now I've tried apachectl status
and I got answer that apache is *not* running.
how is this possible and what is the problem
can anyone help?
thx
|
|
|
08-24-2005, 02:37 AM
|
#9
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
xspace, i coudn't see apache process in the listings you've sent. So this makes me believe that apache is not running.
try running the following to check httpd.conf syntax check: httpd -t
if you're using this, run the following to check vhost confs: http -S
make sure that `/var/run/httpd.pid` file does not exist, if apache finds this file on startup, it will terminate immediately, thinking that another instance is already running; sometimes, if you do `kill -9` on apache, it will leave this file
at the last, do `apachectl start` and see what it tells you, if it goes off silently, you need to check the logs, i think that the error messages would go to system logs, not apache ones
|
|
|
08-24-2005, 02:39 AM
|
#10
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
you don't need to do vhost conf check as you don't have it in your httpd.conf
|
|
|
08-24-2005, 05:20 AM
|
#11
|
LQ Newbie
Registered: Aug 2005
Posts: 12
Original Poster
Rep:
|
Quote:
try running the following to check httpd.conf syntax check: httpd -t
|
well I'll do it if you tell me how, I've tried tu put in command line "check: httpd -t"
and it returns bad command or something like that
I know now that the apache is not running and I can't start it even when it shows me "started OK"
it's kind of weird stuff
but please heeeeeeeeeeeeeeeelp!!!!
xp
|
|
|
08-24-2005, 07:11 AM
|
#12
|
Member
Registered: Jun 2004
Location: Kansas City, MO
Distribution: Fedora (LXQT)
Posts: 276
Rep:
|
I'm guessing it doesn't even show you an error mesg, like httpd already running, so it would be a simple matter of rm'ing the lock file. Your httpd.conf seems much simpler than mine, so I don't see that there are anything strange going on with it. Your setup problems really got me stumped.
|
|
|
08-24-2005, 09:28 AM
|
#13
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
Did you remove apache's pid file? Did you check your logs?
I agree that there's no need to run syntax check on on your apache conf, but just fyi on how-to, you type `httpd -t /path/to/httpd.conf` -- that's it
|
|
|
08-25-2005, 02:58 AM
|
#14
|
LQ Newbie
Registered: Aug 2005
Posts: 12
Original Poster
Rep:
|
hey
i didn't fine the apache's pid file so probably it doesn't exist, and I don't really know where to find those system logs, can you direct me ?
thanks
|
|
|
08-25-2005, 03:36 AM
|
#15
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
try these files:
/var/log/messages
/path/to/apache/root/logs/error_log
|
|
|
All times are GMT -5. The time now is 04:48 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
|
|