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 |
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-19-2010, 12:38 PM
|
#1
|
LQ Newbie
Registered: Aug 2010
Posts: 8
Rep:
|
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.
|
|
|
08-19-2010, 12:48 PM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
|
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
|
|
|
08-19-2010, 01:11 PM
|
#3
|
LQ Newbie
Registered: Aug 2010
Posts: 8
Original Poster
Rep:
|
Thanks. I am getting below error with correct syntax
httpd.conf: unrecognized service
How can i fix it.
|
|
|
08-19-2010, 01:21 PM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
|
The service is httpd not httpd.conf.
See in my previous post what you need to run (as root)
|
|
|
08-19-2010, 01:39 PM
|
#5
|
LQ Newbie
Registered: Aug 2010
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
08-19-2010, 02:20 PM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,229
|
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
and run:
Code:
/usr/sbin/httpd -f /etc/httpd/testconf/httpd.conf -k start
|
|
|
08-19-2010, 03:06 PM
|
#7
|
LQ Newbie
Registered: Aug 2010
Posts: 8
Original Poster
Rep:
|
Thanks it works.
|
|
|
All times are GMT -5. The time now is 05:47 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
|
|