Quantcast
Channel: Active questions tagged heroku - Webmasters Stack Exchange
Viewing all articles
Browse latest Browse all 44

Configure Apache for multiple web roots based on domain

$
0
0

I have a single app, which shares a large amount of code in PHP but which has 3 separate application-level folders depending on the domain name entered. IE:

  • app.example.com is /apps/app-name/frontend
  • portal.example.com is /apps/app-name/portal
  • api.example.com is /apps/app-name/api

How do I customize Apache, either through .htaccess or through Heroku settings so that connections to app.example.com are directed to the frontend directory?

I have thought about doing this via a master index file which imports the correct app from its folder using an include statement based on domain but this seems fairly hacky to me and I would rather do this at the server config level that from within the app. Have looked all over and have been unable to find any useful information.

I use Heroku for hosting by default which only allows one web process type and which associates to a given site root.


Viewing all articles
Browse latest Browse all 44

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>