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 6779991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:27:12+00:00 2026-05-26T16:27:12+00:00

Some solutions about redirection can be found. But what I want to do is

  • 0

Some solutions about redirection can be found. But what I want to do is redirecting part of requests to another server, specifically, only when a request url includes string “service”. For example:

http://localhost/service/image————-> http://localhost:8080/service/image

http://localhost/service/image/upload——> http://localhost:8080/service/image/upload

http://localhost/service/blog————–> http://localhost:8080/service/blog
…..
……………………………………………………………………………………………………………………………………………..
but blow will still served by ngnix,cause no “service” included within url

http://localhost/wiki/….

http://localhost/video/….

How to do this?

  • 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-05-26T16:27:12+00:00Added an answer on May 26, 2026 at 4:27 pm

    You need to use location regex matching together with proxy_pass, example:

    upstream apache {
      server 127.0.0.1:8080;
    }
    
    # in your server block:
    
    server{
    
      # location matching is prioritized by accuracy and order of definition
    
      location ~* ^/service {
        proxy_pass http://apache;
        proxy_redirect off;
      }
    
    }
    

    ^/service will match any request beginning with /service and forward it to Apache.

    proxy_pass is transparent for the user, i.e. it will forward the request to Apache and return the output to the user.

    For more info on location matching, checkout http://wiki.nginx.org/HttpCoreModule#location

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

Sidebar

Related Questions

I've seen some questions about e.g redirecting to the calling page but the general
I'm wondering about some ideas which can improve process of designing solutions using Access
I've searched the Internet and have found some good solutions for teeing STDOUT to
i have seen some hand rolled solutions but does jquery out of the box
I know there are multiple solutions online, but some are for windows, some are
I did some digging around about this, but nothing really seems to answer my
I know this question is posted many times, but I want to ask about
For some solutions, when I open them Visual Studio will get files that aren't
I'm trying to use the sharepoint API to deploy some solutions and the global
I'm using TFS 2008 and I would like to build some solutions in debug

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.