I currently have WordPress installed in /blog where / is the root of the site htdocs. I have created a folder at /api with a php file within and am trying to access the file through http://www.site.com/api.
The Nginx configuration has the root set to /blog and http://www.site.com goes to the WordPress installation as expected. I have set a location /api under the server to have root at /api. When accessing http://www.site.com/api, a 404 occurs and goes to the WordPress 404 page.
I am using Nginx with a socket to PHP-FPM.
Could you recommend a change in Nginx configuration to get this to work? Thanks.
- The topic ‘Directory access using Nginx’ is closed to new replies.