VirtuBox/nginx-ee

Question about plesk setup

theraw opened this issue · 2 comments

Hello i'm sorry to ask about this, this is a simples question i was thinking as you went thru all this maybe you can have some info for me,

Actually what i want to reach is just replace current nginx installed by plesk with nginx plus and add some dynamic modules on nginx.conf

I'm using Plesk Obsidian 18.0.21 on Debian 9

Current nginx.conf is

#user  nginx;
worker_processes  1;

#error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

#pid        /var/run/nginx.pid;

include /etc/nginx/modules.conf.d/*.conf;

events {
    worker_connections  1024;
}


http {
    include       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  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    #tcp_nodelay        on;

    #gzip  on;
    #gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    server_tokens off;

    include /etc/nginx/conf.d/*.conf;
}

# override global parameters e.g. worker_rlimit_nofile
include /etc/nginx/*global_params;

What i wanted to ask is if i change somethings in nginx.conf ex add my dynamic modules there or optimize it because as you can see is pure default will plesk remove my changes ?!

This has nothing to do with you or your repo you can close this without answer if you want i was just thinking as you've created this repo maybe you know how plesk reads nginx.conf and can let me know.
Thanks

Hello @theraw,
from my knowledge, Plesk will never overwrite nginx.conf, so feel free to edit it.
But I suggest you to create additional .conf files in /etc/nginx/conf.d as much as possible, instead of editing nginx.conf directly to make it as clean as possible.
However, there are some directives to update which are only available in nginx.conf like worker_processes 1;.

Here the beginning of my personal nginx.conf :

#user  nginx;
#worker_processes  1;
worker_processes auto;
worker_cpu_affinity auto;
worker_rlimit_nofile 100000;


#error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

#pid        /var/run/nginx.pid;

include /etc/nginx/modules.conf.d/*.conf;

#events {
#    worker_connections  1024;
#}

pcre_jit on;

events {
        multi_accept on;
        worker_connections 50000;
        accept_mutex on;
        use epoll;
}

thanks for info 👍