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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:04:23+00:00 2026-05-22T03:04:23+00:00

I plan develop one web application with PSGI/Plack. (probaly with Dancer, but not decided

  • 0

I plan develop one web application with PSGI/Plack. (probaly with
Dancer, but not decided yet).

The applicatiion should be utf8, multilingual (with Locale::Maketext) and (ofc) will contain some statical pages in the given language. My idea is deploy it in different language domains like en.example.com, de.example.com etc. The application itself is simple, mostly will only fill templates with localized texts and some other (light) functionality.

What is the best solution to deploying one application for mutiple language-based sub-domains in one physical machine?

My current research ended with this solution: need to use Apache and its name based virtual servers for every language subdomain.

<VirtualHost en.example.com>
    ServerName en.example.com
    DocumentRoot /path/to/site/en/files
    <Location />
        SetHandler perl-script
        PerlResponseHandler Plack::Handler::Apache2
        PerlSetVar psgi_app /path/to/site/en/en.psgi
    </Location>
</VirtualHost>

Questions:

  • What is the best solution?
  • Exists any solution with Starman or other pure-perl server? If yes, how? Reverse proxy?
  • Will be the pure perl solution better (faster)?
  • should i consider some other solution? (fcgi, nginx etc…)

Any other ideas/things what can have impact to development itself?

  • 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-22T03:04:23+00:00Added an answer on May 22, 2026 at 3:04 am

    Use Plack::App::URLMap to setup a virtualhost in Starman (or whatever PSGI compatible web servers):

    use Plack::App::URLMap;
    my $en_app = generate_app('en');
    my $ru_app = generate_app('ru');
    
    my $app = Plack::App::URLMap->new;
    $app->map("http://en.example.com/" => $en_app);
    $app->map("http://ru.example.com/" => $ru_app);
    $app->to_app;
    

    in generate_app you can setup/configure whatever needed to return a new PSGI app. If you want to share the same $app instance but want to dynamically change the behavior, you can do so by writing PSGI middleware, like:

    my $app = sub { MyApp->run(@_) };
    my $en_app = sub {
       my $env = shift;
       $env->{'myapp.language'} = 'en';
       $app->($env);
    };
    my $ru_app = sub { ... }; # same
    

    Note that you probably want to put Starman behind proxy, in which case you should configure the frontend (nginx/Apache/lighttpd etc.) to forward the Host: header as it is to the backend.

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

Sidebar

Related Questions

I am planning to develop a very simple java application (not mobile, but desktop
I plan to develop a nice little application that will run on an arm-based
I plan to develop Android application which will encrypt/decrypt voice data such that parties
I plan to develop some native C++ project in VS2010. But it is possible
I my quest to develop a cross platform application I have decided to use
We (Company X) plan to develop an iPhone App for one of our Customers
We plan to develop a ASP.NET ( VS 2010 ) web site. We need
I plan to be storing all my config settings in my application's app.config section
We plan to redesign, improve our (C#) application architecture. Anyone has some framework, hompage
I know PHP and am just beginning with MySql (but plan to use ODBC).

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.