• mochiejuns

    (@mochiejuns)


    Hi guys,

    I would like to seek any help from you, i develop my project using apache then when i’m about to miragte it using [DUPLICATOR] plugin and install it on may prod server it installed successful but all other page went 404 except Home page. i found out our server runs NGINX and not apache, i found the solution for that using nginx config like in this link
    https://www.digitalocean.com/community/questions/wordpress-and-nginx-404-errors-all-but-home-page

    the page is all working slightly now but i noticed its so slow and loads forever after 1 min. then when our monitoring in server check it, the performance cpu and memory starts to escalate so from 50% to 99% – 100%, i cant tell what went wrong or what is missing in nginx config.

    Fyi may project placed in sub directory of the root in result the nginx config is

    
    location /<SUBFOLDER_NAME> {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ /index.php?q=$uri&$args; 
            #try_files $uri $uri/ =404;
            # Uncomment to enable naxsi on this location
            # include /etc/nginx/naxsi.rules
        }
    

    thank you in advance

    • This topic was modified 7 years ago by Jan Dembowski. Reason: Fixed formatting
Viewing 2 replies - 1 through 2 (of 2 total)
  • undiscoveredhouse

    (@undiscoveredhouse)

    If you’re using nginx, I believe you should have PHP-FPM set up?

    Did you check your PHP error log or slow logs? Might give you an idea of what’s causing the issue. If you don’t have PHP slow log enabled, you can check out this article on how to do it.

    Thread Starter mochiejuns

    (@mochiejuns)

    Thank you for replying actually we just place it to root instead of placing it in <SUBFOLDER_NAME>, it works fine now in the root but i didnt had the chance to fix it when its being place on <SUBFOLDER_NAME>, thanks again ill try to check the logs next time if i place it again in sub folder instead in root file :).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘nginx server config’ is closed to new replies.