0

I followed the instructions described in:

https://docs.bitnami.com/aws/infrastructure/nodejs/administration/use-htpasswd/

I tried with different paths for Directory and double checked all the paths several times.

Please note that my app is currently running so paths shouldn't be the issue.

Does anyone know how does this work?

Amy Pellegrini
  • 3,200
  • 1
  • 13
  • 19

1 Answers1

0

The Directory block is meant to change the configuration for a specific folder that Apache is serving. In this case, I think you are using a Proxy action to show your app's information through Apache, right? This guide explains how to do it (or you can share the .conf files inside the /opt/bitnami/apps/jptv/config/server folder)

https://docs.bitnami.com/google/infrastructure/nodejs/administration/create-custom-application-nodejs/

In that case, you will need to use a "Location" or "Proxy" blocks to configure the authentication. You will need to edit the httpd-app.conf file with any of them. There are some examples in this Stack Overflow thread

Apache reverse proxy with basic authentication

Can you try with any of these configuration options in the httpd-app.conf file?

<Location />
    AuthType Basic
    AuthName "JPTV DEV Environment"
    AuthUserFile "/opt/bitnami/apache2/jptv_users"
    Require valid-user

  <IfVersion >= 2.3>
   # Require all granted
  </IfVersion>
</Location>

ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/

or

<Proxy *>
    AuthType Basic
    AuthName "JPTV DEV Environment"
    AuthUserFile "/opt/bitnami/apache2/jptv_users"
    Require valid-user

  <IfVersion >= 2.3>
   # Require all granted
  </IfVersion>
</Proxy>

ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/

Please remember to restart Apache when editing the file.

Jota Martos
  • 4,548
  • 3
  • 12
  • 20