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

If you set up virtual hosts properly in Apache (or whatever your web server is) you shouldn't have to do any .htaccess changes to you standard installation. You would just set each virtual host to point to the applicable document root.

Here is a link to the virtual host configuration documents for Apache: http://httpd.apache.org/docs/2.2/vhosts/

于 2013-01-14T16:51:44.213 に答える