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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:41:45+00:00 2026-05-11T08:41:45+00:00

I have two applications, one is the www.myexample.com , another is the blog.myexample.com .

  • 0

I have two applications, one is the www.myexample.com, another is the blog.myexample.com. I am using PHP and Apache.

Now, I want to let www.myexample.com runs on port 82 of my machine, and blog.myexample.com on port 83, on the same machine. How to configure the apache and/ or the PHP scripts so that when the requests for the requests are served properly?

Edit: Thanks for everyone who responds, but I afraid I don’t get the question clear– my bad!

What I really want is to simulate a condition whereby the http://www.myexample.com and blog.myexample.com are located on different machines. So when a request comes in, the gateway server ( the one which is also hosting http://www.myexample.com) will check whether this is a request for http://www.myexample.com or for blog.myexample.com and does the necessary reroutes.

How to do this? Thanks.

  • 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. 2026-05-11T08:41:46+00:00Added an answer on May 11, 2026 at 8:41 am

    I will assume that you have your own reason for wanting the two sites (www and blog) to run on different ports – and in different processes. If this is not what you intended, e.g. you did not want to have two distinct processes, then having different ports may not be what you intended either: use VirtualHost instead, to co-host the two domains within the same apache+php instance on port 80. Otherwise, read on.

    Assuming that you have your two apache+php processes listening on localhost:82 and localhost:83 respectively, bring up a third, apache-only process to act as a reverse proxy. Have the reverse proxy apache instance listen for requests coming on port 80 from the internet, with two virtual host definitions. The first virtual host definition, www, would forward requests to localhost:82, whereas the second virtual host definition, blog, would forward requests to locahost:83, e.g.:

    NameVirtualHost *:80  # www <VirtualHost *:80>   ServerName www.myexample.com   ProxyPass               /       http://localhost:82/   ProxyPassReverse        /       http://localhost:82/ </VirtualHost>  # blog <VirtualHost *:80>   ServerName blog.myexample.com   ProxyPass               /       http://localhost:83/   ProxyPassReverse        /       http://localhost:83/ </VirtualHost> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two slideshows in one page using javascript http://www.flickrshow.com/static/scripts/flickrshow-7.2.min.js , but it only
I have a URL of form http://www.example.com?foo=one&foo=two I want to get an array of
i have two flex applications and i want to pass the data from one
I run foo.com. I have two different applications that live in foo.com: one is
I have two web applications and both are developed in ASP.NET. Now I want
I have two applications with a single domain name ( www.domain.com and test.domain.com ).
I have two applications in my project 'test' the applications are one.mxml and two.mxml
I have two web applications running in the same Tomcat Instance. In one of
I have two window form applications written in C, one holds a struct consisting
I have two medium-sized web applications that I'm merging into one. They are both

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.