Custom post type gives 404 on Nginx

[ad_1]

My WP is installed on C:/laragon/www/stage

Everytime i try to access custom post type pages I created with ACF Pro:

http://localhost/stage/tennis_training/test/
http://localhost/stage/class/tennis/

I get 404 Not Found from nginx/1.26.2

What I'm doing wrong with my config?

server {

listen 80 default_server;

server_name localhost ;

root "C:/laragon/www";

index index.html index.htm index.php;

# Access Restrictions

allow 127.0.0.1;

deny all;

include "C:/laragon/etc/nginx/alias/*.conf";

location / {

try_files $uri $uri/ index.php$is_args$args;

    `#autoindex on;`

}

location ~ \.php$ {

include snippets/fastcgi-php.conf;

fastcgi_pass php_upstream;

#fastcgi_pass unix:/run/php/php7.0-fpm.sock;

}

charset utf-8;

location = /favicon.ico { access_log off; log_not_found off; }

location = /robots.txt { access_log off; log_not_found off; }

location ~ /\.ht {

deny all;

}

}

[ad_2]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer