Code Monkey home page Code Monkey logo

nginx's People

Contributors

dimroc avatar johnjelinek avatar linman0x90 avatar pilerou avatar pilwon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx's Issues

can not change nginx.conf

Define mountable directories.

VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"]

why don't add volume "/etc/nginx",
I want to change nginx.conf file

403 Forbidden

When I give some data in index.html of usr/share/nginx/www it is being displayed in localhost. But when I create a directory name "demo" in usr/share/nginx/www and give localhost/demo it says 403 forbidden. What should I do to resolve this error ? Thanks in advance.

gpgkeys: key 8B3981E7A6852F782CC4951600A6F0A3C300EE8C can't be retrieved

https://github.com/dockerfile/nginx/blob/master/Dockerfile

is not working ..

Step 2 : RUN add-apt-repository -y ppa:nginx/stable && apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* && echo "\ndaemon off;" >> /etc/nginx/nginx.conf && chown -R www-data:www-data /var/lib/nginx
---> Running in 7e953f0234fc
gpg: keyring /tmp/tmp8mtqiiv2/secring.gpg' created gpg: keyring/tmp/tmp8mtqiiv2/pubring.gpg' created
gpg: requesting key C300EE8C from hkp server keyserver.ubuntu.com
gpgkeys: key 8B3981E7A6852F782CC4951600A6F0A3C300EE8C can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://ppa.launchpad.net trusty InRelease [15.4 kB]
Get:2 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Get:3 http://archive.ubuntu.com trusty-security InRelease [65.9 kB]
Get:4 http://archive.ubuntu.com trusty Release.gpg [933 B]
Get:5 http://archive.ubuntu.com trusty Release [58.5 kB]
Ign http://ppa.launchpad.net trusty InRelease
Get:6 http://ppa.launchpad.net trusty/main amd64 Packages [2050 B]
Get:7 http://archive.ubuntu.com trusty-updates/main Sources [348 kB]
Get:8 http://archive.ubuntu.com trusty-updates/restricted Sources [5217 B]
Get:9 http://archive.ubuntu.com trusty-updates/universe Sources [197 kB]
Get:10 http://archive.ubuntu.com trusty-updates/main amd64 Packages [979 kB]
Get:11 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [23.5 kB]
Get:12 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [467 kB]
Get:13 http://archive.ubuntu.com trusty-security/main Sources [148 kB]
Get:14 http://archive.ubuntu.com trusty-security/restricted Sources [3920 B]
Get:15 http://archive.ubuntu.com trusty-security/universe Sources [43.2 kB]
Get:16 http://archive.ubuntu.com trusty-security/multiverse Sources [2544 B]
Get:17 http://archive.ubuntu.com trusty-security/main amd64 Packages [618 kB]
Get:18 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [20.2 kB]
Get:19 http://archive.ubuntu.com trusty-security/universe amd64 Packages [169 kB]
Get:20 http://archive.ubuntu.com trusty-security/multiverse amd64 Packages [4857 B]
Get:21 http://archive.ubuntu.com trusty/main Sources [1335 kB]
Get:22 http://archive.ubuntu.com trusty/restricted Sources [5335 B]
Get:23 http://archive.ubuntu.com trusty/universe Sources [7926 kB]
Get:24 http://archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
Get:25 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Get:26 http://archive.ubuntu.com trusty/restricted amd64 Packages [13.0 kB]
Fetched 21.8 MB in 44s (491 kB/s)
Reading package lists...
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 00A6F0A3C300EE8C
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
fontconfig-config fonts-dejavu-core geoip-database libfontconfig1
libfreetype6 libgd3 libgeoip1 libjbig0 libjpeg-turbo8 libjpeg8 libtiff5
libvpx1 libxpm4 libxslt1.1 nginx-common nginx-full
Suggested packages:
libgd-tools geoip-bin fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
fontconfig-config fonts-dejavu-core geoip-database libfontconfig1
libfreetype6 libgd3 libgeoip1 libjbig0 libjpeg-turbo8 libjpeg8 libtiff5
libvpx1 libxpm4 libxslt1.1 nginx nginx-common nginx-full
0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded.
Need to get 4433 kB of archives.
After this operation, 14.6 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
nginx-common nginx-full nginx
E: There are problems and -y was used without --force-yes
The command '/bin/sh -c add-apt-repository -y ppa:nginx/stable && apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* && echo "\ndaemon off;" >> /etc/nginx/nginx.conf && chown -R www-data:www-data /var/lib/nginx' returned a non-zero code: 100
rajrajen$

debian 8.2 problem

debian 8.2 x64, docker 1.9.x

docker run --name nginx -p 8080:80 -v $PWD:/usr/share/nginx/html -d nginx
docker inspect nginx

so I get IP - 172.17.0.3

curl 172.17.0.3

give error

url: (7) Failed to connect to 172.17.0.3 port 80: Connection refused

I try sudo service networking restart - doesn't works.

Can you help?

nginx's remote_addr always be the docker0 bridge ip

I pull down this image and run as following comand:

docker run --name redirect -v ~/temp/nginx/www:/usr/share/nginx/html:ro -v ~/temp/nginx/nginx.conf:/etc/nginx/nginx.conf:ro -p 8888:80 10.20.132.153:5000/nginx

the nginx run well,
but when I check the access.log in /var/log/nginx/access.log, I found out that all the client ip($remote_addr) is the ip of docker0 bridge of the host.

I also try with this command but the issus is still.

# change -p 8888:80 to --net host
docker run --name redirect -v ~/temp/nginx/www:/usr/share/nginx/html:ro -v ~/temp/nginx/nginx.conf:/etc/nginx/nginx.conf:ro --net host 10.20.132.153:5000/nginx

/var/lib/nginx/ Permission Denied

I am seeing a lot of these permissions errors with proxied sites. Can you add permissions to /var/lib/nginx/ as seen here: http://nishal-tech.blogspot.com/2013/06/nginx-13-permission-denied-while.html otherwise, I have to turn buffering off in my site.conf.

2014/05/14 17:50:52 [crit] 7#0: *111 open() "/var/lib/nginx/proxy/4/00/0000000004" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/application.css?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/application.css?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"
2014/05/14 17:50:52 [crit] 7#0: *44 open() "/var/lib/nginx/proxy/5/00/0000000005" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/jquery.js?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/jquery.js?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"
2014/05/14 17:50:53 [crit] 7#0: *47 open() "/var/lib/nginx/proxy/6/00/0000000006" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/backbone/plugins/emoticons.js?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/backbone/plugins/emoticons.js?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"
2014/05/14 17:50:56 [crit] 7#0: *51 open() "/var/lib/nginx/proxy/7/00/0000000007" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/application.css?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/application.css?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"
2014/05/14 17:50:56 [crit] 6#0: *259 open() "/var/lib/nginx/proxy/8/00/0000000008" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/application.css?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/application.css?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"
2014/05/14 17:50:56 [crit] 6#0: *260 open() "/var/lib/nginx/proxy/9/00/0000000009" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/jquery.js?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/jquery.js?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"
2014/05/14 17:50:57 [crit] 6#0: *275 open() "/var/lib/nginx/proxy/0/01/0000000010" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/backbone/plugins/emoticons.js?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/backbone/plugins/emoticons.js?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"
2014/05/14 17:51:09 [crit] 6#0: *331 open() "/var/lib/nginx/proxy/1/01/0000000011" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/application.css?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/application.css?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"
2014/05/14 17:51:10 [crit] 6#0: *257 open() "/var/lib/nginx/proxy/2/01/0000000012" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/jquery.js?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/jquery.js?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"
2014/05/14 17:51:11 [crit] 6#0: *258 open() "/var/lib/nginx/proxy/3/01/0000000013" failed (13: Permission denied) while reading upstream, client: 10.9.4.52, server: , request: "GET /assets/backbone/plugins/emoticons.js?body=1 HTTP/1.1", upstream: "http://172.17.0.4:3000/assets/backbone/plugins/emoticons.js?body=1", host: "kandan:8080", referrer: "http://kandan:8080/users/sign_in"

Can't get the real client IP to my web-servers.

I 've the below config.

server {
listen 8080;
location / {
proxy_pass http://backend;
proxy_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
set_real_ip_from 172.16.131.253;
real_ip_header X-Forwarded-For;
real_ip_recursive on;

But it's not working and I 'm still getting the IP of my host reaching the webservers. I think the http_realip_module module is not built in.

Can you compile the nginx from source with some common modules like http_realip_module, http_geoip_module, http_ssl_module etc? It would be of great help.

Is this only for static file servers?

I may be using this Dockerfile/container incorrectly but I have not yet been able to use it as a proxy for a very simple ExpressJS application that I have running.

Does this Dockerfile only serve static content that is provided by the mounted volume? I receive 502 errors when trying to use the proxy_pass directive. I'm not sure I quite understand how Docker contains ports but I can obviously access port 80 from outside the container. I guess a better question would be: is the container able to access my node server I have running on my localhost port 3000 (which is not part of the container)? Is there some configuration or is this just simply not possible?

Issue with 1.13-alpine

I'm getting the following error when I try to use/pull the image

no matching manifest for linux/amd64 in the manifest list entries

nginx repo no longer needed

Since nginx (1.4.6-1ubuntu3.1) is now included in the trusty repository the ppa for nginx/stable can be removed.

Cannot add PPA: 'ppa:nginx/stable
Please check that the PPA name or format is correct.

container exits immediately

root@li692-186:~/nginx# docker run -d -p 80:80 -t dockerfile/nginx
51edf2e9b19d943dae27c859a86f94e129ffc022872598dbf403c9e492489e92
root@li692-186:~/nginx# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
root@li692-186:~/nginx#

nginx Container Open (13: Permission Denied)

I am trying to setup a private docker registry and I am getting this error from my nginx docker container:

2015/07/01 19:40:29 [crit] 6#0: *17 open() "/var/cache/nginx/client_temp/0000000001" failed (13: Permission denied)

I have verified that /var/cache/nginx/client_temp is writeable by nginx user. I have also added this to my dockerfile:

RUN chown +R nginx /var/cache/nginx

To make sure that nginx user has recursive permissions to this folder. Any ideas of what I can try next?

Error: image dockerfile/nginx:latest not found

The readme says to run docker run -d -p 80:80 dockerfile/nginx in order to use the image. However, the error above is returned. Removing dockerfile/ seems to work. Is there something that changed for this image?

add-apt-repository problem and ubuntu

There wasn't SPC so add-apt-repository wasn't recognized and whole script crashed (even after trying to logging on docker hub)

Oh and FROM dockerfile/ubuntu don't work for me (give me error pull access denied for dockerfile/ubuntu, repository does not exist or may require 'docker login') so I had to change on default ubuntu from docker hub.

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.