- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Apache Server Error 500 -- plz help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2004 03:17 PM
10-13-2004 03:17 PM
# rpm -q httpd
httpd-2.0.40-21
I have to implement the following scenario
If a client belongs to the network-id of 10, i.e. if client's ip is like 10.x.x.x, then he/she will access the page without asking for username/password from apache server.
But if client's ip is other than 10.x.x.x, he must be asked for username/password by the apache server.
i did the following
# cat /etc/httpd/conf/httpd.conf
.
.
.
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
# cat /var/www/html/.htaccess
AuthUserFile /tmp/.htpasswd
AuthName "Private"
AuthType Basic
require valid-user
Allow from 10
Satisfy all
Now from any client either from 10.x.x.x, or from 11.x.x.x, when i access the page, following error message receives
Server error!
The server encountered an internal error and was unable to complete your request. Either the
server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster
Error 500
10.0.0.100
Wed 13 Oct 2004 11:30:22 PM PKST
Apache/2.0.40 (Red Hat Linux)
But when I just remove the "Allow from 10", and "Satisfy all" from the /var/www/html/.htaccess, the server works properly, i.e. pages are protected, and offered by entering userid/password
So plz help me, and le me know what i did wrong, and how can I implement the above mentioned scenario
Best Regards
Maaz
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2004 05:52 PM
10-13-2004 05:52 PM
Re: Apache Server Error 500 -- plz help
What a pain.
http://httpd.apache.org
There are instructions there.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2004 06:52 PM
10-13-2004 06:52 PM
Re: Apache Server Error 500 -- plz help
First try to change the AllowOverride line to:
AllowOverride AuthConfig Limit
This is because Allow is a Limit type. See http://httpd.apache.org/docs-2.0/mod/core.html#allowoverride
Second I think that you must change the Satisfy all line to Satisfy Any to get what you want. All means and (address and password), Any means or (address or password). See http://httpd.apache.org/docs-2.0/mod/core.html#satisfy
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 05:08 AM
10-14-2004 05:08 AM
Re: Apache Server Error 500 -- plz help
Ok, Now server error 500 is removed, as per the instructions, i did the following
in httpd.conf
AllowOverride AuthConfig Limit
in .htaccess
Require valid-user
Allow from 10
Satisfy any
but now apache server doesnt even ask for userid/password to the clients of another network, i.e. if client's ip is 11.x.x.x, then he/she can access the pages, without being prompt for userid/password.
Many Thanks
Regards
Maaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 07:05 PM
10-14-2004 07:05 PM
SolutionThis is probably because of Allow from all (or the default). Apache will look if somebody can access the page in this order:
Allow from all
Require valid-user
Allow from 10
Allow from all is good for all clients, so no password ask. To get what you want you must set up the folowing order:
Deny from all
Require valid-user
Allow from 10
So you can put in httpd.conf
AllowOverride AuthConfig Limit
and in .htaccess
Order Deny,Allow
Deny from all
AuthUserFile /tmp/.htpasswd
AuthName "Private"
AuthType Basic
Require valid-user
Allow from 10
Satisfy Any
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2004 04:28 PM
10-15-2004 04:28 PM
Re: Apache Server Error 500 -- plz help
Thanks, and Regards,
Maaz