Link to home
Start Free TrialLog in
Avatar of viola123
viola123

asked on

how to set the ip address in apache web serve config file?

Hi all,
we are try to use ip address to control who can access our web page. i want to set ip address in apache httpd.conf file. but  i found i have to put fixed ip address to that file. otherwise it does not work.
if we don't have fixed ip address for everyone, what i should do?
i tried to put ip address like: 10.10.*.* OR proxy server ip address, but they are not working.

do you have any idea? or i don't have to use ip address to control the access?

thanks a lot
viola
in httpd.conf file:
----------config ip address part----------
#
# Control access to business partner pages
#
<Location /private/partner>
  Order Deny,Allow
  Deny from all
 
  # yyy proxy server
  Allow from xxx.xx.xxx.xxx
 
  # employee A
  Allow from xxx.xx.xxx.xxx
 
  # employee B
  Allow from xxx.xxx.xxx.xxx
</Location>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of David S.
David S.
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kerem ERSOY
Kerem ERSOY

Hi,

Just change the order as:

Order Allow,Deny

Then remove "Deny from al"

It should work like that. Don't forget to restart your web server after you've saved the file.

Cheers,
K.


BTW I dont see any index page setting to your /private/partner directory. Is it becasue you've copied only the address matching part here ?
Avatar of viola123

ASKER

KeremE:
yes, you are right, i only copied the address matching to here.

thanks
hi all,
i will test the solutions and let you know the results.

thanks a lot
viola
KeremE:
if i change the order like what you suggested, what ip address i should put there, eg. proxy server address? or like 10.10.*.* ?

thanks
#
# Control access to business partner pages
#
<Location /private/partner>
  Order Allow, Deny
 
 
  # yyy proxy server
  Allow from xxx.xx.xxx.xxx
 
  # employee A
  Allow from xxx.xx.xxx.xxx
 
  # employee B
  Allow from xxx.xxx.xxx.xxx
</Location>

Open in new window

Kravimir:
it works very well.

thanks a lot