In this post I will explain in details how to configure your environment for app development in a standalone server setup. I find this scenario very useful when you want to debug a remote event receiver and you don't have a windows azure subscription or as in my case I wanted to test an app which requires multiple user accounts and I have a single user developer plan account and I don't want to add 10 user subscription just to test my SharePoint App.

First of All you need to add a sub-domain or separate domain to configure the Apps Url

  1. Go to DNS settings 
  2. Inside your DNS Server In my case the server name was SP , expand Forward look-up Zone
  3. Under your main domain (insight.com in my case)add new CNAME
  4. In Alias Name type *.apps and in Full qualified type *.apps.yourdomain.com in the target host type the full qualified name of your SP Server which acts like DC and DNS as well (Single server environment)
  5. to make sure that your configuration is correct open the command prompt and ping 12232.apps.yourdomain.com if it resolve to your sharepoint server IP means your DNS configuration is good to go 
  6. Now you need to make sure that the app subscription settings service application is configured and running , by default it's stopped and you need to run power-shell script to do the following

      • Create managed account
      • Create proxy for the service application 
      • Create the service application itself
      • You can follow the MSDN Guide on how to configure the subscription service application here
  7. Open Central administration and click on Apps menu item on the left side menu
  8. Click on Configure App URLs 
  9. Type the subdomain you previously configured in DNS apps.yourdomain.com , as an app prefix type app or anything else your want
  10. Click on  Manage application catalog under application management and create an application catalog 
  11. Create a news developer site collection and use it to deploy and test your SharePoint apps.
Now you can use your On-Premise Development server to test your apps