Adding Custom rules to nginx config - virtual_feature.pl

1 post / 0 new
#1 Wed, 01/27/2016 - 20:06
webie4webmin

Adding Custom rules to nginx config - virtual_feature.pl

Hello all hope some body can help me I am trying to add custom configuration block to nginx config file to process perl through nginx I bit stuck on how to return virtual domain file path inside this code block below?

File: /usr/share/webmin/virtualmin-nginx/virtual_feature.pl

my $cgi = {
      'type' => 1,
      'name' => 'location',
              'words' => [ '~', '^/cgi-bin/.*\.cgi$' ],                
                   
                    'members' => [
{ 'name' => 'root',
  'words' => [ &virtual_server::public_html_dir($d) ] },
                                                     

this

&virtual_server::public_html_dir($d)

writes full vhosts path such as '/var/www/vhosts/domain/example.com/httpdocs;'

I need to return '/var/www/vhosts/domain/example.com' only can some please help.

kind regards Darren