0

Nginx FastCGI custom config

matrix142 9 years ago 0
There is currently an error when adding a new FastCGI PHP site with custom configuration.
It seems that the checkbox "Only use custom configuration" does not work properly.

1. Create a new website (and setup basic settings)
2. Add FastCGI PHP
3. Expand "Extended"
4. Paste in your custom configuration
5. Check "Only use custom configuration"

And then there is the problem:
Ajenti does not only use the pasted in configuration code! It puts the code in its own config file and something like this happens:

#AUTOMATICALLY GENERATED - DO NO EDIT!


server {
listen *:80;


server_name mydomain.de www.mydomain.de;

access_log /var/log/nginx/mydomain.access.log;
error_log /var/log/nginx/mydomain.error.log;

root /var/www/mydomain/htdocs;
index index.html index.htm index.php;

location ~ [^/]\.php(/|$)

!!!Here begins my pasted in custom config!!!
server {
listen *:80;


server_name mydomain.de www.mydomain.de;

access_log /var/log/nginx/mydomain.access.log;
error_log /var/log/nginx/mydomain.error.log;

root /var/www/mydomain.de/htdocs;
index index.html index.htm index.php;


location /old {
deny all;
}

location ~ [^/]\.php(/|$) {

fastcgi_index index.php;
include fcgi.conf;
fastcgi_pass unix:/var/run/ajenti-v-php-fcgi-mydomain-php-fcgi-0.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

}
!!!Here ends the custom config!!!
}


}

}

Thanks for your help.