I followed this tutorial : https://docs.bitnami.com/kubernetes/how-to/deploy-php-application-kubernetes-helm/
At the end of the tutorial, everything works. When I try to integrate CSS or JS into the page, I get a 404 error.
Furthermore, it is served as text/html instead css.
Here is the configuration of my vhost:
server {
listen 0.0.0.0:80;
server_name myapp.com;
root /app;
location / {
index index.php;
}
location ~ \.php$ {
# fastcgi_pass [PHP_FPM_LINK_NAME]:9000;
fastcgi_pass phpfpm:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
Regards
It seems the tutorial is outdated.
The templates available at https://github.com/bitnami/tutorials/tree/master/phpfpm-k8s/helm-chart/templates are outdated. They're based on the Bitnami NGINX Helm chart available two years ago.
You can find the latest Bitnami NGINX Helm chart at: https://github.com/bitnami/charts/tree/master/bitnami/nginx
As you can see, the chart evolved significantly (also the Bitnami NGINX docker image evolved) and therefore, you need to adapt the way to configure NGINX to serve your php app. Check the README.md below for more information:
https://github.com/bitnami/charts/blob/master/bitnami/nginx/README.md