View Single Post
  #9  
Old 31st December 2008, 17:30
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default

Hi all,

Here it comes, Nginx support for ISPC.

Basic support only:
1) No installation support
2) No automatic configuration of ISPC web.
3) No SSL support.
4) Currently only supports php-fpm as php fastcgi engine.
5) Tested and built on Debian based system, sorry rpm guys.

Few notes for maintainers:
*) I had to dos2unix few files so take it into account when diffing.
*) I've changed in some places hard coded references to apache by webserver.

To use:
*) Install php-fpm and mydns (google or contact me for patches for Debian based distros)
*) apply patch
*) install without web
*) configure ISPC in nginx by adding /etc/nginx/available-sites/ispconfig with next content:
Code:
# ISPConfig virtual host

server {
	listen   8080;
	server_name  _;

	access_log  /var/log/nginx/ispconfig.access.log;

	location / {
		root   /usr/local/ispconfig/interface/web/;
		index  index.php;
	}

	# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
	#
	location ~ \.php$ {
		fastcgi_pass   127.0.0.1:9000;
		fastcgi_index  index.php;
		fastcgi_param  SCRIPT_FILENAME  /usr/local/ispconfig/interface/web//$fastcgi_script_name;
		include /etc/nginx/fastcgi_params;
	}

	# deny access to .htaccess files, if Apache's document root
	# concurs with nginx's one
	#
	location ~ /\.ht {
		deny  all;
	}
}
make link to /etc/nginx/enabled-sites/ and restart nginx.
If I didn't forget something, ISPC should be operational.
*) Now enter ISPC web and go to system->edit server->select server->config. Here modify next:
Code:
[web]
website_path=/var/clients/client[client_id]/web[website_id]
website_symlinks=/var/www/[website_domain]/:/var/clients/client[client_id]/[website_domain]/
vhost_conf_dir=/etc/nginx/sites-available
vhost_conf_enabled_dir=/etc/nginx/sites-enabled

[global]
webserver=nginx
*) if brave and going to update existing DB perform next changes:

Code:
-  `apache_directives` text,
+  `webserver_directives` text,
+  `protected_folders` text,

Waiting for feedbacks.
Attached Files
File Type: gz ispconfig-trunk.nginx-0.1.patch.gz (18.0 KB, 423 views)
Reply With Quote