Hello
Our client develop an application in NodeJS it is started on port 3001 and he ask me how to publish it on port 80 / 443 so I write something like this in custom httpd configuration on the domain that they want to publish it:
IPs are fake for demonstration my concept.
However this code doesn't work I am getting the following message when I tried to save changes:
can anyone help me what I am doing wrong or if my understanding is correct?
Our client develop an application in NodeJS it is started on port 3001 and he ask me how to publish it on port 80 / 443 so I write something like this in custom httpd configuration on the domain that they want to publish it:
and he confirmed that the app is working OK, however now he wants to limit access to this app only for certain IP addresses + allow to proxy it internally and here I am totally loss. Is it even doable? I tried put something like this in custom HTTPD configurationAlias /.well-known "/var/www/html/.well-known"
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/.well-known/(.*)
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
ProxyPass /.well-known !
ProxyPass "/" "http://localhost:3001/"
ProxyPassReverse "/" "http://localhost:3001/"
Alias /.well-known "/var/www/html/.well-known"
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/.well-known/(.*)
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
<Location />
ProxyPass /.well-known !
Require all denied
Require ip 185.85.85.1
Require ip 185.85.85.2
Require ip 185.85.85.3
Require ip 185.85.85.4
Require ip 127.0.0.1
ProxyPass / http://localhost:3001/
ProxyPassReverse / localhost:3001/
</Location>
IPs are fake for demonstration my concept.
However this code doesn't work I am getting the following message when I tried to save changes:
AH00526: Syntax error on line 121 of /usr/local/directadmin/data/users/admin/httpd.conf:
ProxyPass|ProxyPassMatch can not have a path when defined in a location.
can anyone help me what I am doing wrong or if my understanding is correct?