Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about plesk setup #91

Closed
theraw opened this issue Jan 14, 2020 · 2 comments
Closed

Question about plesk setup #91

theraw opened this issue Jan 14, 2020 · 2 comments

Comments

@theraw
Copy link

theraw commented Jan 14, 2020

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

@VirtuBox
Copy link
Owner

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;
}

@theraw
Copy link
Author

theraw commented Feb 11, 2020

thanks for info 👍

@theraw theraw closed this as completed Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants