Jump to content

NGINX any feedback ?


Abaksoft

Recommended Posts

  • 5 years later...
On 9/29/2020 at 2:47 PM, wilton_rad said:

.. if you already managed, be sure to inform

Hello Wilton,

i see many unigui developers in forum who are working with NGINX but :

- they don't comunicate yet !!!

- they not share yet !!!

- they are not generous yet !!!

That is a SHAME.

Link to comment
Share on other sites

Yes nginx is possible, what do you know about this ?

On 10/5/2020 at 2:52 PM, Abaksoft said:

That is a SHAME.

I have told many times how to make a virtual proxy, I told in Russian
Nobody asked me anything.

Load balancer is not possible in the case of Unigui, you yourself will understand why if you think about it

Link to comment
Share on other sites

4 hours ago, stas said:

Yes nginx is possible, what do you know about this ?

Thank you Stas.

Can you please describe step by step how to use Nginx with unigui ?

I am sure that it's the next best generation server.

(sorry if I was harsh in my words, but if you see my first topic here,  was in 2015 and nobody pushed a sample).

Regards

Link to comment
Share on other sites

 

On 10/7/2020 at 6:13 PM, stas said:

You did it?

Yes :)

i apreciate your help.

For who are interesting, Here is a step by step way, to run an Unigui Project on Nginx for windows.

Download the lastest nginx-1.19.3  for Windows   (For those who have not Delphi Enterprise Linux like me).

http://nginx.org/en/download.html

image.png.232968df2341914441c91d5068ad2252.png

 

As described on the portal web  (http://nginx.org/en/docs/windows.html

1.  UnCompressed the Folder on C:\nginx-1.19.3

2. Start the server :   cd c:\nginx-1.19.3\start nginx

3. Test Runing the server  :     C:\nginx-1.19.3>tasklist /fi "imagename eq nginx.exe"

If you get this error on the log file : "...bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)"

You can solve it by the command line :   netsh http add iplisten ipaddress=::

Thx to:   https://stackoverflow.com/questions/39586692/nginx-error-bind-to-0-0-0-080-failed-permission-denied

 

4. After seeing this 2 process on Task manager, this mean you have succeffuly run nginx.

image.png.2debd867f1cb0ba6384467eff6d870d9.png

 

5. Compile and executed a new Unigui project as Standalone  (Hello world)   with  (As adviced by Stas)   UniServerModule.URLPath =   /demo 

The URL Path  is an alias : that mean you will start your app from the browser like :  127.0.0.1/myAlias             (here for example :  127.0.0.1/demo  )

6. Stop the nginx   (by terminated process on Task Manager)

7. Open nginx.conf  and add  this line  (location /demo)  on Server Section :

_______________________________________________________

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

       location / {
         root   html;
           index  index.html index.htm;
       }

        location /demo/ {
            proxy_pass   http://127.0.0.1:8077;
        }

_______________________________________________________

 

Save it and re Start the nginx :   double click on  nginx.exe     ( c:\nginx-1.19.3\nginx.exe )

8. Open the browser :  http://127.0.0.1/demo

Have Fun :)

Big Thx  Stas.

 

____________

NB :   Nginx on Linux is much enhanced then on Windows.

On Windows "...high performance and scalability should not be expected...."

 

  • Like 2
Link to comment
Share on other sites

×
×
  • Create New...