Olá estou com um servidor LEMP Linux Oracle 8, Nginx, MySql, PHP.
Que está apresentando: **502 Bad Gateway **
/etc/nginx/nginx.conf
#user nobody;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
gzip_types text/plain text/xml text/css
text/comma-separated-values
text/javascript application/x-javascript
application/atom+xml;
log_format specialLog '$remote_addr forwarded for $http_x_real_ip - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log /var/log/nginx/access.log specialLog;
sendfile on;
keepalive_timeout 65s;
server_tokens off; #Oculta versao Nginx
gzip on;
client_max_body_size 30M;
client_body_timeout 1m;
client_header_timeout 1m;
send_timeout 1m;
server {
listen 80 ;
server_name teste;
index index.html
return 301 https://$host$request_uri;
}
server {
listen 443 ssl default_server;
server_name teste;
root /var/www/html;
ssl_certificate cert/certificate.pem;
ssl_certificate_key cert/privatekey.pem;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1.2;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
client_max_body_size 64M;
client_body_buffer_size 64M;
error_page 404 /var/www/html/wp-content/themes/hello-theme-child/404.php;
location /404.php{
internal;
}
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}
location ~ \.css {
add_header Content-Type text/css;
}
location ~ \.js {
add_header Content-Type text/javascript;
}
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$args;
}
location ~* \.(ico|gif|jpg|jpe?g|png|css|js)$ {
expires max;
}
location ~ ^(.+?\.php)(/.*)?$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_read_timeout 60;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
proxy_set_header Host $host;
proxy_cache_valid 200 24h;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_read_timeout 60;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
proxy_cache_valid 200 24h;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
}
}
}