Hi,
I'm new to Directadmin, I'll appreciate if anyone can help me and save my time ?
I have a cloud server (Ubuntu 16 with DirectAdmin installed on it), and a domain (example.com), and a node.js app that running and listening on port 3000 (127.0.0.1:3000), What I want are:
1. if user type www.example.com in the browser then send him back index.html (static file)
2. if the user type www.example.com/api/test in the browser then send the request to my node.js app (127.0.0.1:3000/api/test) receive the response and send it to the user (reverse proxy).
Previously, when Direct Admin was not installed, I could do this through Nginx by this config:
But now I don't know what should I do in direct admin
I'm new to Directadmin, I'll appreciate if anyone can help me and save my time ?
I have a cloud server (Ubuntu 16 with DirectAdmin installed on it), and a domain (example.com), and a node.js app that running and listening on port 3000 (127.0.0.1:3000), What I want are:
1. if user type www.example.com in the browser then send him back index.html (static file)
2. if the user type www.example.com/api/test in the browser then send the request to my node.js app (127.0.0.1:3000/api/test) receive the response and send it to the user (reverse proxy).
Previously, when Direct Admin was not installed, I could do this through Nginx by this config:
Code:
server {
listen 80;
root /srv/www/web-app;
location /api/ {
proxy_pass http://127.0.0.1:3000;
}
location / {
}
}