Can one domain name host DSP and my WebApp? Bad idea?

You can totally use a single domain for your DF instance and WebApp without touching apache config. Here is what you need to do. Put your WebApp inside the public directory or create a symlink to your WebApp inside the public directory. Let’s call it my_web_app. Create another symlink inside the public directory for the DF admin app (DSP console).

cd /path/to/df/install/root/public
ln -s dreamfactory/dist dsp

Now edit the .env file (It’s a hidden file) that’s inside the DF install root. Uncomment the following line

##DF_LANDING_PAGE=/dreamfactory/dist/index.html

Set this to

DF_LANDING_PAGE=/my_web_app

That’s all you need.

You could also store your WebApp using DF2 storage service and set the DF_LANDING_PAGE to this storage path. For example if you store your app using the default storage service called files inside a directory called my_web_app and make this directory public from files service config page. Then you can access your app using url www.mygreatapp.com/files/my_web_app/index.html. You can then set DF_LANDING_PAGE to this url. This is a better approach as it will allow you to manage your app from within the DF2 instance as well as gives you the freedom to store your app locally or on the cloud using remote storage service such as S3, Racksapce etc.

1 Like