How to prevent people from accessing OpenShift web apps? -


i uploaded wildfly web application free openshift account team members can check out. it's work in progress don't want people know , access via web. if want use i'll send them url "xxx-xxx.rhcloud.com"

is there way prevent people knowing , accessing web application on openshift?

you can use basic authentication in order provides login/password before access contents.

in openshift there enviroment variable called $openshift_repo_dir, path of working directory i.e. /var/lib/openshift/myuserlongid/app-root/runtime/repo/

i create new enviroment variable called secure wrapping folder path.

rhc set-env secure=/var/lib/openshift/myuserlongid/app-root/data --app myappname 

finally connect app ssh

rhc ssh myappname 

and create .htpasswd file

htpasswd -c $secure/.htpasswd <username> 

note: -c option htpasswd creates new file, overwriting existing htpasswd file. if intention add new user existing htpasswd file, drop -c option.

.htaccess file

authtype basic authname "authentication" authuserfile ${secure}/.htpasswd require valid-user 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -