LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-19-2010, 12:38 PM   #1
vs224
LQ Newbie
 
Registered: Aug 2010
Posts: 8

Rep: Reputation: 0
Error while running httpd.conf


Hi,

I installed Red Hat AS 5.2, ran iptables.sh to put firewall on.
When i try to run httpd.conf i am getting below errors

ServerTokens: command not found
ServerRoot: command not found
Pid: command not found
etc. etc.

I do not understand why i am getting these error, i have conf.d file in place. I am newbie. Please help.
 
Old 08-19-2010, 12:48 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
Blog Entries: 1

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
Hi and welcome to LQ,

httpd.conf is a configuration file, so you don't run it. You have to run
Code:
service httpd start
to start the httpd daemon, that uses httpd.conf to setup its runtime configuration
 
Old 08-19-2010, 01:11 PM   #3
vs224
LQ Newbie
 
Registered: Aug 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks. I am getting below error with correct syntax

httpd.conf: unrecognized service

How can i fix it.
 
Old 08-19-2010, 01:21 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
Blog Entries: 1

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
The service is httpd not httpd.conf.
See in my previous post what you need to run (as root)
 
Old 08-19-2010, 01:39 PM   #5
vs224
LQ Newbie
 
Registered: Aug 2010
Posts: 8

Original Poster
Rep: Reputation: 0
It worked thanks.

When i installed linux, it by default created conf and conf.d

I needed some modification in them so i created testconf and testconf.d.
The testconf has httpd.conf.test (This is modified from httpd.conf, but has configuration that i need)

Where can i specify that httpd.conf.test should run instead of default ones.

Thanks again.
 
Old 08-19-2010, 02:20 PM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
Blog Entries: 1

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
You could edit httpd.conf, after making a backup of the original file. Besides this is a good practice to make backups of files you're going to edit.
Anyway, if you want to use a different config file, stop the service
Code:
service httpd.stop
and run:
Code:
/usr/sbin/httpd -f /etc/httpd/testconf/httpd.conf -k start
 
Old 08-19-2010, 03:06 PM   #7
vs224
LQ Newbie
 
Registered: Aug 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks it works.
 
  


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
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 07:24 AM
running httpd.conf without restarting apache mpower Linux - Newbie 3 03-16-2005 05:20 PM
httpd.conf Syntax error tommytomato Linux - Newbie 2 05-25-2004 05:10 AM
httpd.conf error hrc Linux - Software 4 07-07-2003 06:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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