Having spent some time, I tried again to use Nodejs on Windows iis Server Hosting
The server did not allow me to correctly configure the Nodejs app, but I discovered that strangely I was able to correctly bind using a subdomain.
So I set up the project with Wappler and the targets (local and remote) are successfully connected, even if I tried to change the handler on iis but Wappler does not allow it.
Using the local target connects and displays correctly, while using the remote target the server reports error
The IIS setting of the subdomain used is that of default, but I don't know if it must be changed
IIS is trying to acess /index.js, why? It's on your 404 screenshot
Instead, IIS should've attempted to connect to NodeJS' port, not attempt to read file /index.js
Unfortunately, I don't know how to solve the issue, and I think it's going to be difficult to find someone familiar with the problem, because not a lot of people use IIS
The problem is that I can configure wappler, but I don't know how to avoid the problem, because the configuration seems correct to me
Maybe some changes on the server on the IIS page is needed, but I have no idea how to intervene
After several tests I convinced myself that the attempt to differentiate the general root from the Root document did not produce acceptable results
So I left by eliminating subdomain and using the default folder "Httpdocs"
I succeeded (changing the permissions of the TMP folder) to remotely view the Index page of the project
But the problem is that the CSS configurations are not used and there will probably be other problems.
In fact, the setting of the root folder Nodejs document on the server is "Httpdocs" and is incompatible with the Wappler setting which provides for the use of the "Public" folder
How should I do to solve this problem?
I got a response from the provider. URL Rewrite is already installed on the server, but it can only be managed by modifying the web.config file
A first doubt is where should the config.web file be placed, in the root of the domain or in the httpdocs directory?
And then how should it be set; should only the public directory be rewritten or all the files and folders contained therein?
I still think that the web.config file must be present in the httpdocs folder, but I don't understand how to configure it.
I tried various solutions but without a solution
The goal, if I understood correctly, is to make the files contained in the "public" directory available
Plesk should do the configuration for you. What is the url you are trying, in the screenshot I see you probably trying to access /index.js which is not correct. Did you go to that url from Wappler or did the server redirect you to there?
Hello Patrick
I honestly I as bit confused and I'm not sure I can do
In the Windows hosting server, Nodejs is necessarily configured with root document (httpdocs without directory public).
Wappler when he uploads the project inserts the directory (public), but clearly the content is not present in the main directory (httpdocs)
What I am trying to do is make sure that the server still manages to correctly read the content of the folder (public).
I need to configure the web.config file, with but I don't know how, I have tried several times but without result
The problem is not to configure nodejs on the server, because it already works
But since with Windows Nodejs server does not provide for the use of the Public folder, and since Wappler instead uses the Public folder, it is somehow necessary to solve this problem
I think it should be done with the web.config file, but I don't know what the best solution can be
With Windows Plesk hosting
After the upload of the project, Wappler updates the contents of the "Httpdocs/Public" directory
I tested manually copying the entire content of the "Httpdocs/Public" directory on the root "Httpdocs" on the server
This way everything works regularly
But if changes to the project are made, the problem always remains that after the upload it would be necessary to update again
So it would be necessary to provide for an automatic copy of the files. The moment the upload of the project takes place
Is it possible to solve by setting a rewrite in the web file.config ????
Or wappler could save the files also in the httpdocs root ????