Welcome! Log In Create A New Profile

Advanced

Everything is working fine...

Posted by Jedi 
Everything is working fine...
August 07, 2019 04:32AM
Except I have two nginx.conf files, the second one is called nginx.conf.2018.07.23.17.42.04.

The nginx.conf file contains

user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
nginx: [emerg] no port in upstream "php_workers" in /etc/nginx/templates/fastcgi_php.tmpl:13

events {
worker_connections 1024;
}

http {
include /etc/nginx/conf-enabled/*.conf;
include /etc/nginx/sites-enabled/*.conf;
}

The other one has a lot more stuff so I am assuming that is the one nginx is using. I deleted nginx.conf (after making a copy) and renamed nginx.conf.2018.07.23.17.42.04 to nginx.conf and ran nginx -t but it said

nginx: [emerg] no port in upstream "php_workers" in /etc/nginx/templates/fastcgi_php.tmpl:13

so I have put everything back to how it was but I would prefer to have only one nginx.conf file and for it to be named nginx.conf, I assume that's how things are meant to be. Does anyone know how I could achieve that? Thanks for your help.
Re: Everything is working fine...
August 07, 2019 07:13AM
I ended up deleting nginx.conf.2018.07.23.17.42.04. Everything seems ok.

This is what was in it. I wonder if I should transfer some of this stuff over to nginx.conf.

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip on;

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}


#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
Re: Everything is working fine...
August 07, 2019 07:18AM
Also it doesn't have

nginx: [emerg] no port in upstream "php_workers" in /etc/nginx/templates/fastcgi_php.tmpl:13

in the nginx.conf file, I don't know how that got there. I tried to edit the post but wasn't able to.
Re: Everything is working fine...
August 08, 2019 03:36AM
So I been copying over stuff from nginx.conf.2018.07.23.17.42.04 to nginx.conf but when I run "nginx -t" I get stuff like:

nginx: [emerg] "tcp_nopush" directive is duplicate in /etc/nginx/nginx.conf:41
nginx: configuration file /etc/nginx/nginx.conf test failed

nginx: [emerg] "tcp_nodelay" directive is duplicate in /etc/nginx/nginx.conf:42
nginx: configuration file /etc/nginx/nginx.conf test failed

Where would the duplicate be?

I have moved nginx.conf.2018.07.23.17.42.04 far away from /etc/nginx/ so that cant be it.
Re: Everything is working fine...
August 08, 2019 04:05AM
When I add "tcp_nodelay" to /etc/nginx/nginx.conf and run 'nginx -t' it says

nginx: [emerg] "tcp_nodelay" directive is duplicate in /etc/nginx/nginx.conf:42
nginx: configuration file /etc/nginx/nginx.conf test failed

but cant find where else it is specified. I have checked all the files in /etc/nginx/conf-enabled/*.conf but its not there.
Sorry, you can't reply to this topic. It has been closed.

Online Users

Guests: 127
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready