Merge pull request #684 from virtualtam/fix/docker/nginx

Docker: fix & improve nginx+php-fpm configuration
This commit is contained in:
Arthur 2016-11-08 12:06:00 +01:00 committed by GitHub
commit 8185e864a2
7 changed files with 29 additions and 0 deletions

View File

@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- archives contain a `Shaarli` directory, itself containing sources + dependencies
- the tarball is now gzipped
- Minor code cleanup: PHPDoc, spelling, unused variables, etc.
- Docker: explicitly set the maximum file upload size to 10 MiB
### Fixed
- Fix the server `<self>` value in Atom/RSS feeds
@ -27,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Tools: only display parameter description when it exists
- archive.org: do not propose archival of private notes
- Use absolute URL for hashtags in RSS and ATOM feeds
- Docker: specify the location of the favicon
### Security
- Allow whitelisting trusted IPs, else continue banning clients upon login failure

View File

@ -15,6 +15,8 @@ RUN apt-get update \
nano \
&& apt-get clean
RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
COPY nginx.conf /etc/nginx/nginx.conf
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf

View File

@ -11,6 +11,8 @@ http {
default_type application/octet-stream;
keepalive_timeout 20;
client_max_body_size 10m;
index index.html index.php;
server {
@ -49,6 +51,11 @@ http {
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location = /favicon.ico {
# serve the Shaarli favicon from its custom location
alias /var/www/shaarli/images/favicon.ico;
}
location ~ (index)\.php$ {
# filter and proxy PHP requests to PHP-FPM
fastcgi_pass unix:/var/run/php5-fpm.sock;

View File

@ -14,6 +14,8 @@ RUN apt-get update \
supervisor \
&& apt-get clean
RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
COPY nginx.conf /etc/nginx/nginx.conf
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf

View File

@ -11,6 +11,8 @@ http {
default_type application/octet-stream;
keepalive_timeout 20;
client_max_body_size 10m;
index index.html index.php;
server {
@ -41,6 +43,11 @@ http {
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location = /favicon.ico {
# serve the Shaarli favicon from its custom location
alias /var/www/shaarli/images/favicon.ico;
}
location ~ (index)\.php$ {
# filter and proxy PHP requests to PHP-FPM
fastcgi_pass unix:/var/run/php5-fpm.sock;

View File

@ -14,6 +14,8 @@ RUN apt-get update \
supervisor \
&& apt-get clean
RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
COPY nginx.conf /etc/nginx/nginx.conf
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf

View File

@ -11,6 +11,8 @@ http {
default_type application/octet-stream;
keepalive_timeout 20;
client_max_body_size 10m;
index index.html index.php;
server {
@ -41,6 +43,11 @@ http {
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location = /favicon.ico {
# serve the Shaarli favicon from its custom location
alias /var/www/shaarli/images/favicon.ico;
}
location ~ (index)\.php$ {
# filter and proxy PHP requests to PHP-FPM
fastcgi_pass unix:/var/run/php5-fpm.sock;