Question
How to forward requests from the domain to an specific application running locally on a given port?
How to make the application content available by browsing the domain?
Answer
- Go to Domains > example.com > Dashboard > PHP
- Uncheck the PHP Support option
- Press OK
-
Go to Domains > example.com > Hosting & DNS > Apache & nginx Settings.
-
Uncheck the Proxy mode option.
-
Add the following lines into Additional nginx directives:
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:3000;
}Note: Replace 3000 with the corresponding port number where the application listen.
-
Press OK button to apply the changes.