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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:31:42+00:00 2026-06-14T07:31:42+00:00

I am using Play 2.0 framework, which I know use the Netty HTTP server

  • 0

I am using Play 2.0 framework, which I know use the Netty HTTP server by default. How can you set virtual host so that http://www.domain1.com redirect to http://www.maindomain.com/sites/domain1.com/?

Since Play 2.0, the routing is much more restreint and nobody seems to answer this question anywhere.

In Play 1.0, it was possible to do it inside the route file but now it is impossible 🙁

I am also using the jar production files (with dist), just to be clear, and I know Netty is there but I have no clue how to add virtual host.

  • 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-14T07:31:43+00:00Added an answer on June 14, 2026 at 7:31 am

    It seems like I’ve found the answer of my own question. Having a lot of PHP background and no Web application background, I wasn’t understanding correctly the principle of front-end and back-end with Play 2.0.

    What I need to do is keep Play running on 9000 and have a front-end Apache server (a different one!). Then, virtual hosts are as easy as before. I don’t need to touch to the Netty HTTP server.

    <VirtualHost *:80>
      ProxyPreserveHost On
      ServerName www.domain1.com
      ProxyPass  /excluded !
      ProxyPass / http://127.0.0.1:9000/sites/domain1.com/
      ProxyPassReverse / http://127.0.0.1:9000/sites/domain1.com/
    </VirtualHost>
    

    You can get more infos at http://www.playframework.org/documentation/2.0.4/HTTPServer

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

Sidebar

Related Questions

Do anyone know which web server is used by play! framework? I'm planning to
I develop an application using the Play! Framework which makes heavy use of the
I am writing small app, using Play Framework 2.0 which uses Ebean as ORM.
I am using Play Framework 2.0 with Scala. So I have an action that
i'me working on a web server using play framework 2.0, where the login is
I`m using Play! Framework 2.0 and I'm new in this framework. How can I
I'm using Play framework. I have a JSONObject which has a structure like the
I'm using the Play framework to build a web app which integrates with Salesforce
I am starting a Play Framework project which is using a specific dll (bought
I'm using play framework 1.2.4 and i'm preparing an meal order system. So i

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.