Tag : Nginx

2017-05-02T16:16:31.190+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is ‘always’. 2017-05-02T16:16:31.190+0800 I CONTROL [initandlisten] ** We suggest setting it to ‘never’ 2017-05-02T16:16:31.190+0800 I CONTROL [initandlisten] 2017-05-02T16:16:31.190+0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 3901 processes, 1000000 files. Number of processes should be at least 500000 : 0.5 times number of files. ..

Read more

Method code for validation: function dbmethods:auth_scram_sha1(username, password) local user = string.gsub(string.gsub(username, ‘=’, ‘=3D’), ‘,’ , ‘=2C’) local nonce = ngx.encode_base64(string.sub(tostring(math.random()), 3 , 14)) local first_bare = “n=” .. user .. “,r=” .. nonce local sasl_start_payload = ngx.encode_base64(“n,,” .. first_bare) r, err = self:cmd(attachpairs_start({ saslStart = 1 ; mechanism = “SCRAM-SHA-1” ; autoAuthorize = 1 ; ..

Read more

Today, I developed a vue single-page application, thinking that I would just throw the packaged files directly onto the server. Finally, I found out that I couldn’t. After inquiring, I didn’t install the relevant dependent environment, such as nginx. The solutions given online include lnmp and docker. I’m not very familiar with both of them ..

Read more

Build nginx gogs in docker, both in the same docker network.Test conditions: Gogs can be accessed via IP+ port Nginx can be started and can proxy another html page and be accessed through a secondary domain name. Question:Gogs cannot be accessed through the secondary domain name. Error reporting:502 Bad Gateway nginx/1.15.6The domain name in the ..

Read more

Environment:1.wordpress and mysql are installed with docker, and wordpress’s port is 8080.2.nginx is installed directly in utuntu. Problem description: Direct accesshttp://www.zhuyuntao.com, will be redirected to 8080. However, redirection is not configured in nginx. The configuration of the/etc/nginx/sites-available/default file is as follows. server { listen 80; server_name www.zhuyuntao.com ; location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host ..

Read more

Question: Mime.types reported an error when docker started nginx Include fastcgi_params in the site configuration also reported an error. 1. mime.types error correlation Nginx container error log: 2018/09/25 13:27:27 [emerg] 1#1: open() “/etc/nginx/mime.types” failed (2: No such file or directory) in /etc/nginx/nginx.conf:14 nginx: [emerg] open() “/etc/nginx/mime.types” failed (2: No such file or directory) in /etc/nginx/nginx.conf:14 ..

Read more

Docker and ngixn mirror information is as follows: root@iZ28q62x60iZ:/srv/testServer# docker -v Docker version 18.03.1-ce, build 9ee9f40 root@iZ28q62x60iZ:/srv/testServer# docker images REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest 649dcb69b782 19 hours ago 109MB root@iZ28q62x60iZ:/srv/testServer# Execution error reports the following error: root@iZ28q62x60iZ:/srv/testServer# docekr run –name nginx -d -p 80:80 -v $PWD/conf/nginx.conf:/etc/nginx/nginx.conf nginx No command ‘docekr’ found, did ..

Read more

The nginx page in docker, windows access 200, linux access 301. What is this situation (nginx and docker related configurations are attached below)Host ip 192.168.251.172 Windows access Linux access Nginx access log Nginx plus configuration location /test { #root /usr/share/nginx/html; root /opt/hsq/; index index.html index.htm ; } Docker container details [ { “Id”: “4881ad1456bc68b1972c2f17443fa2a25abaa0c2470757cefc475cee2afdfa46”, “Created”: ..

Read more

Environment: Nginx (with SSL)+Docker+Ghost The Docker container runtime is configured with an environment variable -e URL=xxx Nginx configuration: server { listen 443 ssl http2; ssl on; server_name xxxxx.xxx; ssl_certificate /etc/nginx/ssl/*.xxxxx.xxx.cer; ssl_certificate_key /etc/nginx/ssl/*.xxxxx.xxx.key; add_header Strict-Transport-Security max-age=31536000; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:80xx; } } server { listen 80; server_name xxxxx.xxx; add_header ..

Read more