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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 64k
  • Answers 64k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I was surprised about this (and as a result deleted… May 11, 2026 at 10:58 am
  • added an answer The two most common speculations I've seen are that the… May 11, 2026 at 10:58 am
  • added an answer Take a look at the TestDisk utilities. They are designed… May 11, 2026 at 10:58 am

Related Questions

I have two threads in an Android application, one is the view thread, and
I have two web applications running in the same Tomcat Instance. In one of
I have two medium-sized web applications that I'm merging into one. They are both
I have two applications written in Java that communicate with each other using XML
I have two applications under tomcat/webapps folder. tomcat/webapps/App1 tomcat/webapps/App2 Both applications share the same
I have two applications in two solutions in VS2008 that share a common dll,
Suppose I have two applications written in C#. The first is a third party
Here's the thing: I have two applications, written in C++ and running on two
I have two web applications in the same server like this: /basedir/app1path/default1.aspx /basedir/app2path/default2.aspx How
I have two web applications and both are developed in ASP.NET. Now I want

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.