0
Terminé

How can i set my config for my website in Nginx Server?

Krzysztof Bednarczyk il y a 10 ans mis à jour par Eugene Pankov (Project coordinator) il y a 10 ans 4
Where i should put my config declarations for my website? I want to put this:
index index.php;
error_page 404 /Page/System/404/;
error_page 403 /403/;
autoindex off;
location / {
  if (-e $request_filename){
    rewrite ^/(.+).css$ /min/css.php?file=$request_filename break;
  }
  if (!-e $request_filename){
    rewrite ^/(.+) /xv.php/$1 break;
  }
}
location ~ ^(.*)\.(tpl|sql|tmp|config)$ {
  deny all;
}
But this didn't working on ajenti.

Solution

Solution
Terminé
Putting stuff in General > Custom Configuration will append it to the server { ... } directive. Put your index, error_page, location-deny configuration there. For your location /, put the rewrite configuration into Content > / > Custom Configuration, and it will be inserted into respective generated location { ... } block.
JE SUIS SATISFAIT
yeah, thank you! :)
Note de satisfaction par Krzysztof Bednarczyk il y a 10 ans
Solution
Terminé
Putting stuff in General > Custom Configuration will append it to the server { ... } directive. Put your index, error_page, location-deny configuration there. For your location /, put the rewrite configuration into Content > / > Custom Configuration, and it will be inserted into respective generated location { ... } block.
How do I have to put "location / " into the Custom Configuration? Nginx says duplicate location...
If you already have "/" location in Content, put your location settings into Content > (content entry) > Advanced > Custom configuration instead.
Actually I have the same problem, even putting my custom config into its place, Ajenti overwrites the content, for example, I can not remove the "index index.html..." part, Ajenti puts it automaticaly, the same with location / even if I put my custom stuff, ajenti puts it's default stuff so I get duplicated things and that... weird
Now a "use custom configuration ONLY" option is available in Location settings.