-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nginx ingress - all of css js and images 404 #333
Comments
Did you have a look on the requested URLs (network tab of your browser)? Do they match |
@foxylion here is nginx-ingress-controller's log:
The above paragraph |
Grafana for example does have a configuration property to change the path: http://docs.grafana.org/installation/configuration/#static-root-path |
Closing. Please follow the advice from foxylion and reopen if you still have issues |
@zhuqinghua I'm wondering what did you set in |
@nikitazernov I had a same issue too. In my case, I solved with below settings. Create a values.yaml for helm install. values.yaml grafana.ini:
server:
root_url: http://demo.bruce.com/grafana/ Change root_url value properly. It should include subpath if any. I put 'grafana' in my example. And install grafana with the values.yaml as below. If you want to know all available settings, refer helm grafana chart / values.yaml and grafana.ini configuration Create an ingress resource as below. ingress apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
name: ingress-grafana
namespace: monitoring
spec:
rules:
- host: demo.bruce.com
http:
paths:
- backend:
serviceName: grafana
servicePort: 80
path: /grafana
status:
loadBalancer: {} I set rewrite-target as root After grafana pod is running you should be able to connect to it successfully. |
Hi, I am having very similar issue. I am trying to visualize my mongodb data using mongo express.
Any help would be appreciated.. `apiVersion: networking.k8s.io/v1beta1
|
@Arjunkrisha that is expected. The I suggest you remove the rewrite-target annotation after changing the env variable. https://github.com/mongo-express/mongo-express#usage-docker |
Hey @aledbf Now my config looks like:
baster-api-ingress.yaml
|
I think this is the best way, and it works for me |
@sanzenwin Thanks a lot mate.... I have been searching this kind of a solution for the whole day... It works perfectly and as I want it. |
Hi @nemodev , |
@sanzenwin I met the problem and solved it. IMHO the key point is the difference between URL rewriting and URL redirection:
Therefore the annotaion could solve these problems.
|
I can access it via http, but only the html is accessible, all of its css js and images 404.
ingress
/etc/nginx/nginx.conf
anyone can give me some suggestions? thank you
The text was updated successfully, but these errors were encountered: