• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 859
  • Last Modified:

Restart Apache Server fails !

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
jibranilyas
Asked:
jibranilyas
1 Solution
 
ramazanyichCommented:
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
 
jibranilyasAuthor Commented:
thanks
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now