Giter Site home page Giter Site logo

Comments (9)

cf-gitbot avatar cf-gitbot commented on August 16, 2024

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/115845431.

from staticfile-buildpack.

Dannyzen avatar Dannyzen commented on August 16, 2024

Thank you for reporting this issue we will look into promptly.
On Mar 17, 2016 5:55 AM, "cf-gitbot" [email protected] wrote:

We have created an issue in Pivotal Tracker to manage this. You can view
the current status of your issue at:
https://www.pivotaltracker.com/story/show/115845431.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#71 (comment)

from staticfile-buildpack.

davidjahn avatar davidjahn commented on August 16, 2024

Hi @wolfgangkirchler , I am trying to understand your error so that we can push out a fix for the staticfile buildpack as soon as possible.

I am not able to replicate the error. Could you possibly provide me with the following information if it is available?

  • what version cloud foundry are you running on? do you know if the backend is running diego or DEA? you can get the latter info by running cf has-diego-enabled <my-app-name>
  • does your app have a custom nginx.conf file, or additional nginx modules you are enabling? if so, what are the changes?

It would be easiest if you could provide a sample application that is giving the above error, otherwise the above information would be very useful. Thank you!

from staticfile-buildpack.

wolfgangkirchler avatar wolfgangkirchler commented on August 16, 2024
$ cf curl /v2/info
{
   "build": "2222",
   "version": 2,
   "api_version": "2.23.0",
}

We run on DEA and not on Diego.

We have a custon nginx.conf but no additional modules. Here is my nginx.conf:

worker_processes 1;
daemon off;

error_log <%= ENV["APP_ROOT"] %>/nginx/logs/error.log debug;
events { worker_connections 1024; }

http {
  log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent';
  access_log <%= ENV["APP_ROOT"] %>/nginx/logs/access.log,severity=debug,tag=nginx cloudfoundry;
  default_type application/octet-stream;
  include mime.types;
  sendfile on;
  gzip on;
  tcp_nopush on;
  keepalive_timeout 0;   # disable keepalive
  port_in_redirect off; # Ensure that redirects don't include the internal container PORT - <%= ENV["PORT"] %>

  real_ip_header    X-Forwarded-For;
  set_real_ip_from  0.0.0.0/0;
  real_ip_recursive on;

  client_max_body_size 25m;

  # DNS resolver, the resolved upstream IP addresses will be cached 30s before another resolution
  resolver 8.8.8.8 valid=30s; # Google DNS

  server {
    listen <%= ENV["PORT"] %>;
    server_name localhost;
    # Allow header size up to 32K
    large_client_header_buffers 4 32k;

    ### some forwarding rules 

  }
}

from staticfile-buildpack.

davidjahn avatar davidjahn commented on August 16, 2024

Does the section ### some forwarding rules try to access a custom config file ip-restriction.txt ? The error log

2016-03-17 09:31:44 +0000 [App/0] ERR /home/vcap/app/nginx/conf/orig.conf:52:in `read': No such file or directory - ip-restriction.txt (Errno::ENOENT)

indicates that nginx cannot find the file ip-restriction.txt. We recently made a change where we move files from the app root directory into the nginx public directory, and no longer copy them. If you refer to config files in the root directory of your app, this will break.

If you change the include command (or whatever you are using to add ip-restriction.txt) to

include <%= ENV['APP_ROOT'] %>/public/ip-restriction.txt

does the app successfully deploy with staticfile-buildpack v1.3.3?

from staticfile-buildpack.

wolfgangkirchler avatar wolfgangkirchler commented on August 16, 2024

@davidjahn: thank you. That was exactly the problem. After I moved ip-restrictions.txt to public folder the service did start up again. :)

from staticfile-buildpack.

jtarchie avatar jtarchie commented on August 16, 2024

@wolfgangkirchler, are you using the staticfile buildpack mainly as an nginx buildpack?

from staticfile-buildpack.

wolfgangkirchler avatar wolfgangkirchler commented on August 16, 2024

@jtarchie: yes thats our main purpose. And we use nginx mainly as reverse proxy.

from staticfile-buildpack.

jtarchie avatar jtarchie commented on August 16, 2024

I am hoping that the router services will help solve that problem for you. The staticfile-buildpack was never meant to be a nginx buildpack, nginx was just a nice side effect. Just want to make sure that future changes we make the buildpack to optimize for static content, don't effect large deployments of nginx being used for reverse proxy purposes.

from staticfile-buildpack.

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.