I am getting this failing everytime with port is not listening on stapp02 even though I cvan curl to it and there is only one port listening when i run the grep command, I have ran this numerous times now and it always fails on this part any assistance would be great
?>[steve@stapp02 ~]sudo tee /etc/nginx/nginx.conf > /dev/null <<‘EOF’F’
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8095;
server_name stapp02;
root /var/www/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php-fpm/default.sock;
}
}
}
EOF
[steve@stapp02 ~]$ sudo nginx -t
sudo systemctl restart nginx
sudo systemctl restart php-fpm
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[steve@stapp02 ~]$ curl http://localhost:8095/index.php
Welcome to xFusionCsudo rm -f /etc/nginx/nginx.conf.defaultm -f /etc/nginx/nginx.conf.default
grep -R “listen” /etc/nginx
/etc/nginx/nginx.conf: listen 8095;
[steve@stapp02 ~]$ exit
logout
Connection to stapp02 closed.
thor@jump-host ~$ curl http://stapp02:8095/index.php
Welcome to xFusionCorp Industries!thor@jump-host ~$
