I have a symfony project with a lot of requests and users, so I decided to use nginx + php-fpm to get a bit more performance.
But my client wants to have plesk for server administration. So, I installed everything whats required (nginx, fpm, apache) and created the host instance in plesk. Now, the start page of the website works fine - but some child pages gives me a 404 error code directly from nginx, other child pages works.
All urls are rewritten (symfony default). I only renamed the symfony default index file of the web folder app.php
to index.php
.
My additional configuration in plesk is: nothing
edit : I use nginx 1.9.4 (delivered with ubuntu or plesk) and symfony 2.8
Try to add a following lines in "Apache & Nginx settings" > "Additional nginx directives" to your domain in Plesk:
if (!-f $request_filename) {
rewrite ^/(.*)$ /index.php last;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.