title: iRedMail NginX config file update
body: <p>Referring the guides <a href="http://blog.eridlabs.com/using-iredmail-with-nginx-ubuntu-13-04-x64/" rel="nofollow noreferrer">Using iRedMail with NginX</a> and <a href="https://stackoverflow.com/questions/15974056/setup-iredmail-admin-site-in-nginx-on-ubuntu-12-04/22490727#22490727">Setting up iRedMail with NginX</a>, I'd like to ask that in the server block  </p>
  
  <blockquote>
    <p>server {<br>
        listen      80;
        server_name mail.mydomain.com;</p>
  </blockquote>
  
  <pre><code>location / {
          rewrite ^ https://$server_name$1 permanent;
  }
  
  location ~ \.php$ {
          fastcgi_pass   unix:/var/run/php5-fpm.sock;
          fastcgi_index  index.php;
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME /usr/share/apache2$fastcgi_script_name;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I want to just remove the /usr/share/apache2 directory using<br>
  <code>$ sudo apt-get remove apache2</code><br>
  or<br>
  <code>$ sudo rm -rf /usr/share/apache2</code>  </p>
  
  <p>therefore in the NginX iRedMail config, can I replace the following line<br>
  <code>fastcgi_param SCRIPT_FILENAME /usr/share/apache2$fastcgi_script_name;</code><br>
  with<br>
  <code>fastcgi_param SCRIPT_FILENAME /usr/share/nginx$fastcgi_script_name;</code><br>
  or with<br>
  <code>fastcgi_param SCRIPT_FILENAME /etc/nginx$fastcgi_script_name; #I can see a file named fastcgi_params at /etc/nginx/</code></p>
  
  <p>Secondly, I'd be interested in knowing how does the variable $fastcgi_script_name gets resolved?</p>