[store-web] Install and configure nginx
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [store-web] Install and configure nginx
- Date: Tue, 13 Oct 2020 12:08:09 +0000 (UTC)
commit 02250651b99f21193b6cde8a5251f97183577cf8
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Tue Oct 13 14:07:44 2020 +0200
Install and configure nginx
Dockerfile | 18 +++++----------
nginx.conf | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 13 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index 5411b86..c04e7da 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,21 +1,13 @@
FROM wordpress:fpm
-RUN apt-get update && apt-get install -y wget && \
- cd /root && wget https://marlam.de/msmtp/releases/msmtp-1.8.11.tar.xz && \
- tar xf msmtp-1.8.11.tar.xz && cd msmtp-1.8.11 && \
- ./configure --prefix=/usr --sysconfdir=/etc && make install && \
- cd / && rm -rf /root/msmtp* && apt-get remove -y wget
-
SHELL ["/bin/bash", "-c"]
-ADD msmtprc /etc/msmtprc
-ADD msmtp.ini /usr/local/etc/php/conf.d/msmtp.ini
-RUN chown 1000420000:1000420000 /etc/msmtprc && chmod 600 /etc/msmtprc
-
-RUN apt-get install -y libxml2-dev &&\
- docker-php-ext-install soap
+RUN apt-get update && apt-get install -y nginx-light && \
+ ln -sf /dev/stdout /var/log/nginx/access.log && \
+ ln -sf /dev/stderr /var/log/nginx/error.log
+ADD nginx.conf /etc/nginx/nginx.conf
-RUN apt-get install -y libldap-2.4-2 libldap2-dev && \
+RUN apt-get update && apt-get install -y libldap-2.4-2 libldap2-dev && \
docker-php-ext-configure ldap && \
docker-php-ext-install -j$(nproc) ldap
ADD ipa-ca.crt /etc/ipa-ca.crt
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..d20f48f
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,76 @@
+worker_processes 1;
+
+error_log /dev/stderr warn;
+pid /tmp/nginx.pid;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ proxy_temp_path /tmp/proxy_temp;
+ client_body_temp_path /tmp/client_temp;
+ fastcgi_temp_path /tmp/fastcgi_temp;
+ uwsgi_temp_path /tmp/uwsgi_temp;
+ scgi_temp_path /tmp/scgi_temp;
+
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ '$status $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ access_log /dev/stdout main;
+
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ keepalive_timeout 65;
+
+ #gzip on;
+
+ upstream php-fpm {
+ server localhost:9000;
+ }
+
+ server {
+ listen 8080 default_server;
+ listen [::]:8080 default_server;
+
+ absolute_redirect off;
+
+ root /var/www/html;
+ index index.php;
+
+ client_max_body_size 100M;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+ }
+
+ location ~ \.php$ {
+ include fastcgi_params;
+ fastcgi_intercept_errors on;
+ fastcgi_read_timeout 300;
+ fastcgi_param HTTPS 'on';
+ fastcgi_pass php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
+ expires max;
+ log_not_found off;
+ }
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]