Solved

Restart Apache Server fails !

Posted on 2004-09-02
2
850 Views
Last Modified: 2006-11-17
I get this error when i try to restart Apache after adding some lines in httpd.conf     if i take out the lines, the webserver starts successfully

[root@*************** var]#  ../etc/rc.d/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: Syntax error on line 1088 of /etc/httpd/conf/httpd.conf:
AuthName not allowed here
                                                           [FAILED]

lines added in httpd.conf

AuthName "Apache"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user

Please advise!
0
Comment
Question by:jibranilyas
2 Comments
 
LVL 19

Accepted Solution

by:
ramazanyich earned 500 total points
ID: 11967971
All that parameters are available only under Directory or Location directive: So your conf should be
<Location /protected/part/of/your/server>
AuthName "Apache"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user
</Location>

where protected /part/of/your/server should be replaced by url which are yu trying to protect
0
 

Author Comment

by:jibranilyas
ID: 11968722
thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question