LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-23-2005, 08:16 AM   #1
xpace
LQ Newbie
 
Registered: Aug 2005
Posts: 12

Rep: Reputation: 0
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
 
Old 08-23-2005, 12:35 PM   #2
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
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.
 
Old 08-23-2005, 04:40 PM   #3
xpace
LQ Newbie
 
Registered: Aug 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 08-23-2005, 05:14 PM   #4
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
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 addessort.

2) Read your httpd.conf, is Listen directive defined correctly? That is, did you specify the required adressort?

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...
 
Old 08-23-2005, 05:42 PM   #5
xpace
LQ Newbie
 
Registered: Aug 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 08-23-2005, 08:42 PM   #6
Ghost_runner
Member
 
Registered: Jun 2004
Location: Kansas City, MO
Distribution: Fedora (LXQT)
Posts: 276

Rep: Reputation: 30
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)
 
Old 08-24-2005, 01:30 AM   #7
xpace
LQ Newbie
 
Registered: Aug 2005
Posts: 12

Original Poster
Rep: Reputation: 0
apache is started and also I have restarted it few times

still same stuff

thanks
 
Old 08-24-2005, 01:36 AM   #8
xpace
LQ Newbie
 
Registered: Aug 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 08-24-2005, 02:37 AM   #9
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
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
 
Old 08-24-2005, 02:39 AM   #10
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
you don't need to do vhost conf check as you don't have it in your httpd.conf
 
Old 08-24-2005, 05:20 AM   #11
xpace
LQ Newbie
 
Registered: Aug 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 08-24-2005, 07:11 AM   #12
Ghost_runner
Member
 
Registered: Jun 2004
Location: Kansas City, MO
Distribution: Fedora (LXQT)
Posts: 276

Rep: Reputation: 30
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.
 
Old 08-24-2005, 09:28 AM   #13
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
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
 
Old 08-25-2005, 02:58 AM   #14
xpace
LQ Newbie
 
Registered: Aug 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 08-25-2005, 03:36 AM   #15
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
try these files:
/var/log/messages
/path/to/apache/root/logs/error_log
 
  


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 config doralsoral Linux - Software 1 11-04-2005 09:01 PM
Apache Config riluve Linux - Software 1 02-14-2005 02:42 PM
Apache config silmaril8n Linux - Newbie 8 11-11-2004 04:02 PM
apache config. drkfir5 Linux - Software 9 10-25-2004 02:05 AM
Apache config problem code_junkie Linux - Newbie 2 11-30-2003 10:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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