Add cgi-bin, lighter ngnix
This commit is contained in:
parent
d0dfee2531
commit
3fefb167b3
|
@ -6,13 +6,17 @@ RUN useradd --create-home nexus ; \
|
||||||
echo "nexus:nexus" | chpasswd
|
echo "nexus:nexus" | chpasswd
|
||||||
|
|
||||||
# Install nginx
|
# Install nginx
|
||||||
RUN apt-get install -y nginx-light
|
RUN apt-get install -y nginx-light fcgiwrap
|
||||||
|
|
||||||
# Configure nginx
|
# 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 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 default /etc/nginx/sites-available/default
|
||||||
|
COPY clear-sockets /start.d/clear-sockets
|
||||||
|
|
||||||
|
RUN chmod +x /start.d/clear-sockets
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
rm /tmp/fcgiwrap.socket
|
||||||
|
|
6
default
6
default
|
@ -14,4 +14,10 @@ server {
|
||||||
autoindex on;
|
autoindex on;
|
||||||
try_files $uri $uri/ =404;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
[program:fcgiwrap]
|
||||||
|
user=www-data
|
||||||
|
command=/usr/sbin/fcgiwrap -f -s unix:/tmp/fcgiwrap.socket
|
||||||
|
autorestart=true
|
Loading…
Reference in New Issue