Welcome to Centmin Mod Community
Become a Member

Nginx How to edit vhost template ?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by nVidian, Mar 18, 2015.

Tags:
  1. nVidian

    nVidian Member

    85
    8
    8
    Mar 16, 2015
    Ratings:
    +23
    Local Time:
    11:08 AM
    1.7.9
    5.5
    Hi, how & where to edit the default nginx vhost template so I dont have to edit every vhost after create using menu #2 ?
     
  2. Mask

    Mask Active Member

    104
    29
    28
    Nov 10, 2014
    Ratings:
    +35
    Local Time:
    9:08 AM
    Nginx 1.9.1
    MariaDB 10.0.19
    I am afraid you will have to edit the config file for each domain since each domain has it's own config file. You can view them under /usr/local/nginx/conf/conf.d/

    If there is come configuration that you need to add to all domains, add it in a file and then just include the file with one line in each domain config.
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,195
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    2:08 PM
    Nginx 1.13.x
    MariaDB 5.5
    actually default vhost template for menu option 2 in centmin.sh is at inc/nginx_addvhost.inc

    For .07 stable it's at lines 47 to 93 of inc/nginx_addvhost.inc

    although include file method might be better depending on what you are trying to do :)