How to Add Default Variable in Nginx vhost?

Discussion in 'Installation/Configuration' started by jaypabs, Jan 21, 2014.

  1. jaypabs

    jaypabs Member

    When we add a website under sites using ISPConfig interface, it will create a file like "" under this path "/etc/nginx/sites-available/".

    My question is on how can I add a default variable on this file like the following:

    	location /status {
    			#fastcgi_pass unix:/var/lib/php5-fpm/web37.sock;
    			fastcgi_index index.php;
    			fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    			include fastcgi_params;
    fastcgi_pass should be filled automatically based on the selection under options tab.

    If I select Use Socket For PHP-FPM, the value of fastcgi_pass should be fastcgi_pass unix:/var/lib/php5-fpm/web37.sock. Of course web37 is ISPConfig generated Linux user and it should be filled according to ISPConfig.

    If TCP is selected then it should be filled out by ISPConfig automatically like:

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    you can modify the default template of the vhost. you find all templates in /usr/local/ispconfig/server/conf/. the modified version of the config file has to be stored in /usr/local/ispconfig/server/conf-custom/
  3. jaypabs

    jaypabs Member

    What is the name of the default template?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There is just one file with nginx and vhost in its name, so you could not have missed it when you looked into the directory :)


Share This Page