1

I have been reading about release management for Openshift and have found a nice process described in Openshifts official blog. According to this process you develop the application locally, then deploy it to a staging environment and in the end, when everything is working, you deploy it to production.

The information I am looking for, but can't find, is how to restrict the access to the staging environment. This environment should only be used by me to test the application in a production-like environment and should not be accessible by other people. Is there a way to do this?

eternitysharp
  • 479
  • 5
  • 16
  • What cartridge/language is your application written in? –  Feb 18 '16 at 22:55
  • I am thinking on using the PHP catridge and put wordpress on it. If possible I would prefer a general answer which does not depend on what catridge is used. Maybe there is a way to configure the gear, for instance that you also need to create a tunnel to even access port 80. – eternitysharp Feb 19 '16 at 08:49

1 Answers1

1

Using the PHP cartridge allows you to do this in a couple of different ways:

  • Using an .htaccess file

  • Using PHP

    • You can also use php code to block access to your website by checking the visitors ip address, along with the existence of an environment variable something like:

    if ($visitors_ip != "x.x.x.x") { exit(); }

Community
  • 1
  • 1