Equivalent of Apache's SetEnv Variable

Raina Gustafson raina at thequeensmen.com
Wed Aug 4 03:45:20 MSD 2010


Ok, great. I just noticed that the Magento config listed on the Nginx
Wiki is way different than the one I'd grabbed from the Magento
forums. I'll wade through those differences in a little while and see
if I can reconcile them intelligently.

I don't have a solid understanding of this stuff - so allow yourself
to be inspired by anything I post at your own risk. :) Trial and error
is my major MO.

Thanks for your insight, Michael.



On Tue, Aug 3, 2010 at 6:34 PM, Michael Shadle <mike503 at gmail.com> wrote:
> yeah, var_dump($_SERVER) - should show you normal variables.
>
> Do you see $_SERVER['HTTPS']?
>
> I think the key location you're missing is putting it in here:
>
> location ~ \.php$ { ## Execute PHP scripts
>        expires                 off; ## Do not cache dynamic content
>        fastcgi_param   HTTPS $fastcgi_https;
>        fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;
>        fastcgi_param   PATH_INFO $fastcgi_script_name;
>        fastcgi_pass    127.0.0.1:9000;
>        fastcgi_index   index.php;
>        include                 fastcgi_params; ## See /etc/nginx/fastcgi_params
>
> try adding these?
>
>             fastcgi_param  MAGE_RUN_CODE  base;
>             fastcgi_param  MAGE_RUN_TYPE  website;
>
>    }
>
> FYI, I was not aware of an $fastcgi_https variable. If there is one,
> that is awesome and I need to add that to my fastcgi_params - it
> should be default as most apps seem to rely on $_SERVER['HTTPS']
>
> I am going to go look if it exists or not :)
>
> On Tue, Aug 3, 2010 at 4:11 PM, Raina Gustafson <raina at thequeensmen.com> wrote:
>> Ok. That's really helpful information. Right now, both of these output nothing:
>> <?php echo $_SERVER['MAGE_RUN_CODE']; ?>
>> <?php echo $_SERVER['MAGE_RUN_TYPE']; ?>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



More information about the nginx mailing list