Commit db6b7ba4 authored by Dave Lane's avatar Dave Lane

fixed major inefficiency in my nginx proxy and fastcgi configuration

parent c5918870
......@@ -71,13 +71,28 @@ RUN echo 'opcache.validate_timestamps = 1' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.save_comments = 1' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.enable_file_override = 0' >> /usr/local/etc/php/conf.d/php.ini
# the PHP-fpm configuration
RUN echo 'security.limit_extensions = .php' >> /usr/local/etc/php-fpm.d/www.conf
# the PHP-fpm configuration - create new www.conf file!
RUN echo '[global]' > /usr/local/etc/php-fpm.d/www.conf
RUN echo 'error_log = /proc/self/fd/2' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo '[www]' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'user = www-data' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'group = www-data' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo '; if we send this to /proc/self/fd/1, it never appears' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'access.log = /proc/self/fd/2' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'clear_env = no' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'catch_workers_output = yes' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'php_flag[display_errors] = off' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'php_admin_value[error_log] = /usr/local/var/log/fpm-php.www.log' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'php_admin_flag[log_errors] = on' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'php_admin_value[memory_limit] = 250M' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo '; Ensure worker stdout and stderr are sent to the main error log.' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'security.limit_extensions = .php' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo '; process management stuff' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm = ondemand' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm.max_children = 10' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm.start_servers = 2' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm.min_spare_servers = 1' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm.max_spare_servers = 3' >> /usr/local/etc/php-fpm.d/www.conf
#RUN echo 'php_flag[display_errors] = off' >> /usr/local/etc/php-fpm.d/www.conf
#RUN echo 'php_admin_value[error_log] = /usr/local/var/log/fpm-php.www.log' >> /usr/local/etc/php-fpm.d/www.conf
#RUN echo 'php_admin_flag[log_errors] = on' >> /usr/local/etc/php-fpm.d/www.conf
#RUN echo 'php_admin_value[memory_limit] = 250M' >> /usr/local/etc/php-fpm.d/www.conf
VOLUME /var/www/html
......
version: "2"
services:
redis:
image: redis:3-alpine
restart:
unless-stopped
networks:
default:
aliases:
- redis.grav.local
app:
image: kiwilightweight/grav
# ports:
# - 127.0.0.1:9002:9000
links:
- redis
volumes:
# - /home/dave/Projects/grav/test:/var/www/html
- /home/dave/Projects/grav/new:/var/www/html
restart:
unless-stopped
networks:
default:
aliases:
- grav.local
nginx:
image: oeru/nginx-jessie
links:
- app
- redis
ports:
- "127.0.0.1:8080:80"
volumes:
......@@ -21,3 +33,7 @@ services:
- ./nginx/cache:/var/cache/nginx
- /home/dave/Projects/grav/new:/var/www/html
restart: unless-stopped
networks:
default:
aliases:
- nginx.grav.local
#
# Set YOUR_DOMAIN, YOUR_WPMS_DIR, and YOUR_PORT below to make this work
# Set YOUR_DOMAIN below to make this work
#
server {
# add [IP-Address:]80 in the next line if you want to limit this to a single interface
listen 80;
listen 0.0.0.0:80;
server_name grav.local;
server_name YOUR_DOMAIN;
root /var/www/html;
index index.php;
......@@ -16,7 +16,7 @@ server {
error_log /var/log/nginx/grav.local_error.log;
location / {
proxy_pass http://localhost:8080;
proxy_pass http://127.0.0.1:8080;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Conection "upgrade";
proxy_set_header Host $http_host;
......
server {
listen 80;
listen 0.0.0.0:80;
index index.html index.php;
## Web root and Domain Name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment