Allow multiple domains to access one directory

  • Posted
  • Proposals 3
  • Remote
  • #622908
  • Awarded
Dan B.
Mohit P.
Georges S. have already sent a proposal.
  • 1

Description

Experience Level: Intermediate
General information for the website: Details below
Description of requirements/features: We have a PHP application which currently resides on an Apache server - it resides in /home/example/public_html/application and is publically accessed via www.example.com/application.

We now need to add multiple domains which will all access the same content - for example www.acme.com/application and www.test.com/application and so on. All the domains will be on the same server.

When someone enters www.acme.com it will display content for acme.com served from /home/acme/public_html - when they enter www.test.com it will display content for test.com served from /home/test/public_html.

However, in all scenarios the content of /home/example/public_html/application should be displayed when /application is accessed.

For example, www.acme.com/signup.php would be served from /home/acme/public_html/signup.php but www.acme.com/application/index.php would be served from /home/example/public_html/application/index.php

Likewise, www.test.com/login.php would be served from /home/test/public_html/login.php but www.test.com/application/help.php would be served from /home/example/public_html/application/help.php

Additionally, the impact of email and SPF and so on needs to be considered - all email coming from /application should use the email domain of the referrer. If someone gets an email from www.test.com/application/email.php then it needs to come from email@test.com - likewise any emails from www.acme.com/application/email.php needs to come from email@acme.com

Additionally, in the future, we will scale out our web layer by adding redundant web servers so nothing which is done now should prohibit that in the future - at the moment, as we add more domains we will simply add more CPU, RAM etc to the standalone server.

I need this setup in such a way the steps are clearly documented for adding a new domain - I am happy modifying httpd.conf, htaccess files and so on but the process needs to be scalable, repeatable and robust.
Extra notes:

Clarification Board

    There are no clarification messages.