1

Alright I am having a hard time figuring out how to set up a production and development environment on my EC2 instance. I am trying to keep this on one server for cost saving.

I really know very little about .htaccess rules and even less about modifying Apache configuration and creating a custom AMI which I am thinking I might have to do.

If someone could point me in the right direction that would be great.

Folder structure

I want subdomain1.website.com/ to route to

/var/www/html/production

  • app/
  • lib/
  • plugins/
  • vendors/
  • .htaccess
  • .travis.yml
  • build.properties
  • build.xml
  • index.php

I want subdomain2.website.com/ to route to

/var/www/html/development

  • app/
  • lib/
  • plugins/
  • vendors/
  • .htaccess
  • .travis.yml
  • build.properties
  • build.xml
  • index.php

What is the correct way to go about setting this up?

4

1 回答 1

1

如果您在 Apache(或任何您的 Web 服务器)中正确设置了虚拟主机,则不必对标准安装进行任何 .htaccess 更改。您只需将每个虚拟主机设置为指向适用的文档根目录。

这是 Apache 的虚拟主机配置文档的链接: http ://httpd.apache.org/docs/2.2/vhosts/

于 2013-01-14T16:51:44.213 回答