Tag: nginx

Docker Nginx image with static content from an external volume – permissions issue

When I run an Nginx container with static content from an external volume, I get a ‘forbidden’ issue. It’s stated that Docker maintains ownership of the host when using a volume so on my local OS X host, user/group is myself:staff, whereas Nginx container is expecting www-data:www-data. On a Linux system, it would be easy […]

systemtap:while resolving probe point: identifier 'process' at source: probe process().function no match

I had installed nginx and lua in my docker image, but I didn’t install nginx on my physical CentOS system. I “docker run my image” and start nginx on my physical CentOS system. So the nginx master and worker process are working. I run an example of nginx-systemtap-toolkit. I run: sudo ./ngx-active-reqs -p 24945 24945 […]

How can I get a container running again, that has stopped now but was running before

I had this container running: docker run -d -P -v $HOME/site:/usr/share/nginx/html –name mysite nginx and then I stopped it These are my images: docker@boot2docker:~$ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE nginx 1.9.2 319d2015d149 6 days ago 132.8 MB nginx latest 319d2015d149 6 days ago 132.8 MB nginx 1 319d2015d149 6 days ago […]

Only one NGINX Server Context works at a time for NGINX sites-enabled

I have the following structure I am working with for NGINX /etc/nginx – nginx.conf – conf.d – a.conf-disabled (I appended ‘disabled’ so it wont be used) – b.conf-disabled (I appended ‘disabled’ so it wont be used) – sites-available – a – b – sites-enabled – a (sym link to sites-available/a) – b (sym link to […]

Nginx & Node inside the same Docker container

I know that this is against the accepted convention but I need to run Nginx alongside a node.js server inside the same Docker container. I have no issues spinning up the container and getting Nginx and Node working alongside. Nginx works on Port 443 which is exposed by the container. The Node server listens on […]

xmlrpc over nginx w/ scgi

I’m trying to configure rtorrent with xmlrpc using nginx as the web server. I’m running into an issue right now where, when I run this command: xmlrpc localhost/rpc system.listMethods I get a 502. nginx logs this error: connect() to unix:/tmp/scgi.socket failed (111: Connection refused) while connecting to upstream, client:, server: localhost, request: “POST /rpc/RPC2 […]

Allowing WordPress to be hosted on a subfolder within an already existing site

We have a request from a client where we need to host a wordpress site within our website. By within, I mean that the site can’t sit in a subdomain, i.e https://blog.example.com, instead it needs to sit in its own route/subfolder, i.e. https://www.example.com/blog. This is due to page ranking (apparently page rankings are penalised if […]

Nginx Docker build failing on Ubuntu

My Docker build is failing: sudo docker build -t nginx_img_1 . W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found [IP: 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/universe/binary-amd64/Packages 404 Not Found [IP: 80] Why is this not working? I cannot find the correct location on the http://archive.ubuntu.com/ubuntu/dists/ website. When I google for binary-amd64 site: archive.ubuntu.com, […]

nginx reverse proxy to a docker container from host doesn't work on certain ports

In my nginx.conf I have server { gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; listen 80; server_name localhost; proxy_buffering off; location /blog/ { proxy_redirect off; proxy_http_version 1.1; proxy_set_header Connection “”; proxy_pass; include /etc/nginx/proxy_params; } location /admin/ { proxy_redirect off; proxy_http_version 1.1; proxy_set_header Connection “”; proxy_pass; include /etc/nginx/proxy_params; } location /api/ { […]

How to deploy django 1.8 on Elastic Beanstalk using Docker

My restrictions are: Django is to be deployed using uWSGI with nginx Django app is to use postgresql that is hosted on RDS the dockerfile will use ubuntu:14.04 as the container OS This is what I have for docker setup: https://github.com/simkimsia/aws-docker-django It contains a dockerfile and other configuration files. I have tested it on linux […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.