• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Nginx - set env_var - typo3 config urls

Chris30

New Pleskian
Hello,

Plesk Onyx, Nginx - FPM - without Apache, Typo3, realURL

I have read and googled a lot but i dont get it.
I try to set the additional nginx conf at the Plesk backend like the following, this works but things like "try_files" and so on doesnt work. Why, what i am doing wrong?

This works and i get nice URLs:
Code:
rewrite !\.(js|ico|gif|jpg|png|css|pdf|mov|mp3|eot|svg|ttf|woff|otf|txt|swf)$ /index.php break;
rewrite /typo3/$ /typo3/index.php break;
rewrite /$ /index.php break;

But things like this dont work (i get allways 404):

Code:
if (!-e $request_filename) {
  set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
  set $test "${test}C";
}
if ($test = PC) {
  rewrite ^.*$ /index.php break;
}


OR something like:

try_files $uri $uri/ /index.php?$args;




The second question is:
How can i set domain spezific enviroment variables? To use this:
Make use of the TYPO3 Application Context
I have read about things like the following but nothing works:
Code:
passenger_enabled on;
passenger_env_var $TYPO3_CONTEXT Development;
passenger_set_header TYPO3_CONTEXT Development;


I sit here now for days and dont get it to work, so please help me. :)
Thanks a lot.

P.S.: sry 4 my bad english. ;)
 
Back
Top