Page 1 of 1

Using NGINX Web Server (v2021)

Posted: Fri Mar 19, 2021 6:10 pm
by lamorte1977

Nginx was written specifically to address the performance limitations of Apache web servers.
Is lightweight and since 2019 is most used webserver.
Would be nice to have it supported.


nginx

Posted: Wed Jul 28, 2021 7:49 pm
by CasperBR

the nginx redirect does not work because the requests from the api /api/action are redirected to the application's root folder.
Any suggestions?


Re: NGINX web server

Posted: Thu Jul 29, 2021 12:14 am
by arbei

PHPMaker 2021 generated site works fine with NGINX web server, see Nginx configuration about how to configure your NGINX web server.

Don't forget that you need to set up URL rewrite for the API folder also, e.g.

        # project folder
        location / {
            try_files $uri /index.php$is_args$args;
        }

        # api folder
        location /api/ {
            try_files $uri /api/index.php$is_args$args;
        }

Re: Using NGINX Web Server (v2021)

Posted: Fri Aug 13, 2021 3:15 am
by lamorte1977

Ops, missed this reply.

The problem was at api location.

Thanks

 # api folder
        location /api/ {
            try_files $uri /api/index.php$is_args$args;
        }

Re: Using NGINX Web Server (v2021)

Posted: Wed Sep 29, 2021 9:39 pm
by ufone

if my folder name is phpapp. how this will be wirte. i need chnage in index.php file?


Re: Using NGINX Web Server (v2021)

Posted: Wed Sep 29, 2021 9:53 pm
by arbei

Read above and URL Rewrite -> Nginx.