LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-21-2004, 09:20 AM   #1
EgosZ
LQ Newbie
 
Registered: Jun 2004
Location: Australia
Distribution: Fedora Core 3, Suse Professional 9.2
Posts: 17

Rep: Reputation: 0
Unhappy 2 files httpd.conf under two diffent location


Hi guys,

I am currently running Apache 2.0.51 server on my labtop. My server is working fine since and everyone on the network can see my test page by typing 192.168.1.103.

However recently, when I try to allocate my httpd.conf file, I found out that there are two similar files one located under usr/local/apache2/conf/httpd.conf and second under etc/httpd/conf/httpd.conf ??? SO which file is actually my config file for Apache and how can i delete another entry without damaging the current server?

And one more thing if you don't mind, my network got access to ADSL Internet connection through a Billion router. I have tried to access the router and change the NAT configuration to redirect request on port 80 from internet to my labtop (currently there are another 3 desktops in my network). However, when i typed in my Internet address it still directed me to the router and asked me to enter user name and password for configuration ???


I am quite confusing with these two problems. Any help regarding to any of the above two would be highly appreciated.

Thanks very much in advance
 
Old 10-21-2004, 11:06 AM   #2
meblost
Member
 
Registered: May 2004
Location: At Keyboard
Distribution: Mandrake 10.0, SuSE 9.0
Posts: 114

Rep: Reputation: 15
On my system, when I do ps -aux | grep httpd, it shows the web server process and the commands they were started with, which lists the config file it is using. See if that works for you. If ps -aux | grep httpd doesn't work, try ps aux | grep apache.

Also, the config file should be listed in apache's rc file in /etc/init.d/httpd. Try grep CONF /etc/init.d/httpd.

Good luck
 
Old 10-21-2004, 03:58 PM   #3
srcfoo
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Rep: Reputation: 0
Are you sure that one isn't a link to the other?

A lot times different distros put config files in their preferred location and then create links in other directories where needed.

Do an 'ls -l' on both and see if either is a link.
 
Old 10-22-2004, 10:58 AM   #4
meblost
Member
 
Registered: May 2004
Location: At Keyboard
Distribution: Mandrake 10.0, SuSE 9.0
Posts: 114

Rep: Reputation: 15
Also, if they aren't links, maybe your system was built with apache installed with ServerRoot /etc/httpd/ and you upgraded/installed a new version of apache. The default location is /usr/local/apache2.
 
Old 10-23-2004, 09:51 PM   #5
EgosZ
LQ Newbie
 
Registered: Jun 2004
Location: Australia
Distribution: Fedora Core 3, Suse Professional 9.2
Posts: 17

Original Poster
Rep: Reputation: 0
Unhappy

Here is the result when I typed in the command
Code:
ps -aux | grep httpd
arning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 2537 0.0 2.3 22328 11508 ? S 08:35 0:00 /usr/sbin/httpd
apache 4306 0.0 2.3 22464 11604 ? S 09:41 0:00 /usr/sbin/httpd
apache 4307 0.0 2.3 22328 11564 ? S 09:41 0:00 /usr/sbin/httpd
apache 4308 0.0 2.3 22328 11564 ? S 09:41 0:00 /usr/sbin/httpd
apache 4309 0.0 2.3 22328 11564 ? S 09:41 0:00 /usr/sbin/httpd
apache 4310 0.0 2.3 22328 11564 ? S 09:41 0:00 /usr/sbin/httpd
apache 4311 0.0 2.3 22328 11564 ? S 09:41 0:00 /usr/sbin/httpd
apache 4312 0.0 2.3 22328 11564 ? S 09:41 0:00 /usr/sbin/httpd
apache 4313 0.0 2.3 22328 11564 ? S 09:41 0:00 /usr/sbin/httpd
egosz 6842 0.0 0.1 4460 596 pts/2 S 11:40 0:00 grep httpd


It would produce the same result for
Code:
ps -aux | grep apache
.

To me this doesn't indicate anything about where the config file allocate Any idea ???

Thanks

Last edited by EgosZ; 10-23-2004 at 09:52 PM.
 
Old 10-24-2004, 08:45 AM   #6
baz2
Member
 
Registered: Nov 2002
Posts: 73

Rep: Reputation: 15
Easy answer: the one in the /etc path. That's the standard location for configuration files.

If that's not a convincing answer, why not change something in one of the files, reload httpd, and see if the change is effected.
 
Old 10-24-2004, 09:18 AM   #7
Jazeker
LQ Newbie
 
Registered: Oct 2004
Posts: 10

Rep: Reputation: 0
rename one of the files to httpd.conf_old

If the server does not start anymore, you have renamed the one it uses.
 
Old 10-24-2004, 11:29 AM   #8
meblost
Member
 
Registered: May 2004
Location: At Keyboard
Distribution: Mandrake 10.0, SuSE 9.0
Posts: 114

Rep: Reputation: 15
Sorry, that should be ps aux | grep apache. Did you try looking through the httpd (or apache) file in /etc/init.d/?
 
  


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
Httpd.conf And Httpd2.conf ???? alejandroye Linux - General 2 11-07-2004 01:23 AM
httpd.conf & ssl.conf kevinm2 Linux - Security 12 08-31-2004 02:25 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-10-2004 12:45 AM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 11:32 PM
Apache httpd location navajo Linux - Software 6 05-21-2003 08:32 PM

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

All times are GMT -5. The time now is 08:27 PM.

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