Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8578065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:18:08+00:00 2026-06-11T20:18:08+00:00

I have two web services(ie my_public_api and my_private_api) running in server1. (PHP,Apache) http:// ipaddress/my_public_api

  • 0

I have two web services(ie my_public_api and my_private_api) running in server1. (PHP,Apache)

http:// ipaddress/my_public_api — Can be accessed by everyone.

http:// ipaddress/otherfuncation/my_private_api – should be accessed only by approved user or specific ipaddress(server2)

I would like to implement some authentication for this. Can this be done using htpasswd basic authentication? if not what could be possible way to implement this.
In case if I use client authentication, is that possible only to protect my private_api and let the my_public_api accessble to everyone.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:18:09+00:00Added an answer on June 11, 2026 at 8:18 pm

    I found out a way to accomplish this using SSL,

    1. Generate Server and Client Certificates
    2. Point the generated certificate on the apache.
    3. Restrict api location / virtual path in the httpd.conf
    4. Distribute the client certificate to whom you want to grant the access.

    check here to know how to set up SSL certificates

    eg: httpd.conf

    <Location /mysite/private_api>
    SSLRequireSSL
    SSLVerifyClient require
    SSLVerifyDepth 1
    </Location>
    

    Check here for more details

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a web application where you can access two services/functions (Buy and Rent).
I have two servlets that access two corresponding Axis2 web services on the same
I have a web application containing two web services, let's say PublicHello.asmx and RestrictedHello.asmx
I have a ASP.NET web service decorated with System.Web.Script.Services.ScriptService() so it can return json
I have an interesting problem, I have two web services defined in a spring-conf.xml
I have two ASMX web services consumed from javascript. The first service performs a
I have two identical web services currently installed on the same PC for testing
I have two code projects both using CXF to use web services. When I
I have a class that access web services. It can optionally cache results. So
I have two applications Web Socket and Web Service created in .Net/Web Form and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.