GithubHelp home page GithubHelp logo

Comments (5)

k8s-ci-robot avatar k8s-ci-robot commented on June 16, 2024

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from ingress-nginx.

longwuyuan avatar longwuyuan commented on June 16, 2024

/remove-kind bug

I don't understand anything about the environment or the use case or practical steps to reproduce the problem. There is no clear definition of the problem. Wait till someone can understand and triage the issue, so the problem description is more clear

/kind support
/triage needs-information

from ingress-nginx.

Velan987 avatar Velan987 commented on June 16, 2024

I am trying to configure nginx to provide content from specific directory, i.e If i invoke root path (/) I need to show index.html.
while configuring server-snippet for this I am getting below error.

Below is my ingress yaml file

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    nginx.ingress.kubernetes.io/server-snippet: |
      location =/{
        root /usr/share/nginx/html;
        try_files $uri $uri/ /index.html;
      }
spec:
  ingressClassName: nginx
  rules:
  - host: test.com 
    http:
      paths:
      - path: /test
        pathType: Prefix
        backend:
          service:
            name: test-svc
            port:
              number: 80

For this ingress I am getting below error
Unknown directive "root" in /tmp/nginx/nginx-cfg3003441674:276
nginx: [emerg] unknown directive "root" in /tmp/nginx/nginx-cfg3003441674:276
nginx: configuration file /tmp/nginx/nginx-cfg3003441674 test failed.

I also went into nginx ingress controller pod, and added below snippet

 location =/{
        root /usr/share/nginx/html;
        try_files $uri $uri/ /index.html;
      }

Getting same error (Unknown directive "root") while reloadin nginx using "nginx -s reload"

from ingress-nginx.

longwuyuan avatar longwuyuan commented on June 16, 2024

At the very least, you should look at the questions that are asked in the new bug report template.

You have not answered any of the questions asked in the new issue template so readers have to guess what the heck is going on here, to begin with.

And then you don't care to explain why you are talking about providing content from inside the controller. The controller has nothing to do providing your content from inside the controller pod

Once you have edited the issue description here and answered all the questions that are asked in a new bug report template, please write a detailed description of why you are trying to provide content from inside the ingress-controller pod. This project is a ingress controller so look at the documentation and write proper issue description that is related to some feature mentioned in the documentation https://kubernetes.github.io/ingress-nginx/

After that you can re-open the issue so that readers can make comments based on useful data posted here.

/close

from ingress-nginx.

k8s-ci-robot avatar k8s-ci-robot commented on June 16, 2024

@longwuyuan: Closing this issue.

In response to this:

At the very least, you should look at the questions that are asked in the new bug report template.

You have not answered any of the questions asked in the new issue template so readers have to guess what the heck is going on here, to begin with.

And then you don't care to explain why you are talking about providing content from inside the controller. The controller has nothing to do providing your content from inside the controller pod

Once you have edited the issue description here and answered all the questions that are asked in a new bug report template, please write a detailed description of why you are trying to provide content from inside the ingress-controller pod. This project is a ingress controller so look at the documentation and write proper issue description that is related to some feature mentioned in the documentation https://kubernetes.github.io/ingress-nginx/

After that you can re-open the issue so that readers can make comments based on useful data posted here.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from ingress-nginx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.