Solution:
Looking at the nginx log, there is no /var/cache/nginx/proxy/temp permission. Authorize it.
sudo chmod a+w /var/cache/nginx/proxy_temp -R
How to Install nginx yum:
Add repo of nginx:
echo '[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/x86_64
gpgcheck=0
enabled=1' > /etc/yum.repos.d/nginx.repo
install
yum update
yum install nginx
Did you install the latest version of nginx directly?
log]$ whereis nginx
nginx: /usr/sbin/nginx /usr/lib64/nginx /etc/nginx /usr/share/nginx /usr/share/man/man8/nginx.8.gz
Then you need to configure the normal user path of nginx. Create the relevant directory and copy the configuration file. Authorize proxy_temp. As above.
log]$ mkdir -p /data/nginx/log /data/nginx/run /data/nginx/conf.d
log]$ cp /etc/nginx/nginx.conf /data/nginx/
log]$ cp /etc/nginx/conf.d/default.conf /data/nginx/conf.d/
sudo chmod a+w /var/cache/nginx/proxy_temp -R
log]$ vi /data/nginx/nginx.conf
#user nobody; worker_processes auto; error_log /data/nginx/log/error.log notice; pid /data/nginx/run/nginx.pid; events { use epoll; worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; 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 /data/nginx/log/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /data/nginx/conf.d/*.conf; }
Hope this article will help you.
Similar Posts:
- Visit the back-end application through nginx and report an error err_ CONTENT_ LENGTH_ MISMATCH
- [Solved] Nginx reverse proxy 502 permission denied
- Fix Nginx 502 Error:upstream sent too big header while reading response header from upstream
- [Solved] Nginx proxy Timeout: upstream timed out (110: Connection timed out)
- Nginx Timeout Error: upstream timed out (110: Connection timed out) while reading response header from ups…
- How to Solve Chrome Error: “net::ERR_INCOMPLETE_CHUNKED_ENCODING”
- Nginx Error: nginx: [emerg] “server” directive is not allowed here in
- Solving the problem of nginx reverse proxy web service soap:address location problem
- [Solved] nginx no resolver defined to resolve..
- [Solved] Nginx 502Bad Gateway: some static resources cannot be accessed