Browse Source

Add cgi-bin, lighter ngnix

master
dave 7 years ago
parent
commit
3fefb167b3
  1. 8
      Dockerfile
  2. 3
      clear-sockets
  3. 6
      default
  4. 4
      fcgiwrap.conf

8
Dockerfile

@ -6,13 +6,17 @@ RUN useradd --create-home nexus ; \
echo "nexus:nexus" | chpasswd
# Install nginx
RUN apt-get install -y nginx-light
RUN apt-get install -y nginx-light fcgiwrap
# Configure nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN echo "daemon off;" >> /etc/nginx/nginx.conf ; cp /usr/share/doc/fcgiwrap/examples/nginx.conf /etc/nginx/fcgiwrap.conf
COPY nginx.conf /etc/supervisor/conf.d/nginx.conf
COPY fcgiwrap.conf /etc/supervisor/conf.d/fcgiwrap.conf
COPY default /etc/nginx/sites-available/default
COPY clear-sockets /start.d/clear-sockets
RUN chmod +x /start.d/clear-sockets
EXPOSE 80

3
clear-sockets

@ -0,0 +1,3 @@
#!/bin/sh
rm /tmp/fcgiwrap.socket

6
default

@ -14,4 +14,10 @@ server {
autoindex on;
try_files $uri $uri/ =404;
}
location /cgi-bin/ {
gzip off;
fastcgi_pass unix:/tmp/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /nexus$fastcgi_script_name;
}
}

4
fcgiwrap.conf

@ -0,0 +1,4 @@
[program:fcgiwrap]
user=www-data
command=/usr/sbin/fcgiwrap -f -s unix:/tmp/fcgiwrap.socket
autorestart=true
Loading…
Cancel
Save