Search code examples
apacheweb-applicationssubdomainproxypass

Disable web application in specific domains


I have a VPS (with Debian 8) on ovh with 3 domains: (I manage them with plesk 12.5.30)

  • domain1.com
  • domain2.com
  • domain3.com

I installed sinusbot application (https://www.sinusbot.com/) with port 1111 and then I can open it simply entering:

  • domain1.com:1111
  • domain2.com:1111
  • domain3.com:1111
  • etc... (any other domain/subdomain)

How can I do to do this? (see below)

  • domain1.com:1111 -> return 404
  • domain2.com:1111 -> return 404
  • domain3.com:1111 -> return 404
  • any other domain/subdomain --> return 404

Except this:

  • sinusbot.domain1.com -> return sinusbot site

I added this:

ProxyPass / http://localhost:1111/
ProxyPassReverse / http://localhost:1111/

sinusbot.domain1.com work perfectly but other domains still works...


Solution

  • Resolved in this way:

    Http directives:

    ProxyPass / http://localhost:1111/
    ProxyPassReverse / http://localhost:1111/
    

    Sinusbot config:

    ListenHost="localhost"