如何运行Apache 2服务器上播放应用程序? [英] How to run Play Application on Apache 2 server?

查看:168
本文介绍了如何运行Apache 2服务器上播放应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全新本,所以请原谅我。

I'm completely new to this, so please forgive me.

什么我现在是这样的,当我运行播放我个人的Mac上运行网​​站上的本地主机启动一个Play应用程序:9000和一切工作正常。

What I have right now is a Play application that, when I run play run on my personal Mac the site launches on localhost:9000 and everything works fine.

我也有运行CentOS的服务器,告诉我添加内容到目录的/ var / www / html等/ 当我浏览到它的IP,但我不明白我怎么能做到这一点与Play应用程序?它不象我有一堆的HTML文件,我可以只把那里?

I also have a server running CentOS that tells me to "add content to the directory /var/www/html/" when I navigate to it's IP, but I don't understand how I can do that with a Play application? It's not like I have a bunch of HTML files I can just put there?

所以我的问题是,什么步骤我需要使它所以如果我去我的服务器的IP,它带我到我做网站和当前存储在我的Mac?

So my question is, what steps do I need to take to make it so if I go to the IP of my server, it takes me to the website I made and that is currently stored on my Mac?

推荐答案

您需要的Apache配置为代理到你的播放应用程序(这就是为什么你会不会需要将任何东西放入 /无功/ www / html等/ )。

You need to configure Apache as a "proxy" to your Play application (that's why you won't need to put anything into /var/www/html/).

您的应用程序code可以在任何地方上传你想要在服务器上。这将需要在服务器上启动(使用播放开始为例)和Apache将前进的请求到正在运行的应用程序播放。

Your application code can be uploaded anywhere you want on the server. It will need to be started on the server (with play start for example) and Apache will "forward" requests to the running Play application.

您可以看看播放文档中的部署应用程序一节中:

You can look at the Play documentation in the "Deploy your application" section :

  • "Deploying your application" (general recommandations) : http://www.playframework.com/documentation/2.1.1/Production
  • "Set-up a front-end HTTP server" (explain how to deploy Play behind Apache or Nginx) : http://www.playframework.com/documentation/2.1.1/HTTPServer

这篇关于如何运行Apache 2服务器上播放应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆