Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #31  
Old 13th July 2009, 11:57
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default

Ok, I'll have to prepare the patch first :-)
I'll update you with details soon.
Reply With Quote
Sponsored Links
  #32  
Old 26th July 2009, 20:03
blackbumer blackbumer is offline
Junior Member
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question

Quote:
Originally Posted by eugenesan View Post
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.
is it right method of isntallation patch :
Code:
cd /usr/local/src/
svn checkout svn://svn.ispconfig.org/ispconfig3/trunk/
mv trunk ISPConfig-trunk
patch -p1 ../ispconfig-trunk.nginx-0.1.patch
should i apply all patches in this thread or just last one? (ispconfig-trunk.nginx-0.2.0.4)
Reply With Quote
  #33  
Old 26th July 2009, 20:34
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default

Hi,

Only the latest patch should be applied, but I suspect there maybe a problem with last one. Seems like several files slipped into "original" tree before I've created patch.

At the moment I have running setup but can't find time to "rediff" it with latest version. In addition some functionality still not documented :-(

I can try to pack a tarball which can be used to merge with latest ISPC version.
What do you think?
Reply With Quote
  #34  
Old 27th July 2009, 08:57
blackbumer blackbumer is offline
Junior Member
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it will be very nice !!!
very need it
Reply With Quote
  #35  
Old 27th July 2009, 23:41
cubells cubells is offline
Member
 
Join Date: Apr 2009
Posts: 34
Thanks: 0
Thanked 1 Time in 1 Post
Default

I'm eager to test it!!
Reply With Quote
  #36  
Old 27th July 2009, 23:47
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default

Hi,

At the moment I am "extracting" changes from local setup to installable tree.
I still need to prepare SQL template, that can take some time.
Hope to finish very soon, maybe tomorrow...
Reply With Quote
  #37  
Old 28th July 2009, 09:14
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
Default

Quote:
Few notes for maintainers:
*) I had to dos2unix few files so take it into account when diffing.
Normally all files should be with unix linebreaks. Do you know which filesw ere wrong?

Quote:
*) I've changed in some places hard coded references to apache by webserver.
Thats sad as it breaks the compatibility with the existing ISPConfig 3 installations and will prevent that we add this patch to ispconfig main branch.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #38  
Old 28th July 2009, 09:26
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default

Quote:
Originally Posted by till View Post
Normally all files should be with unix linebreaks. Do you know which filesw ere wrong?
I didn't write down file names, but when I'll post a patch we probably will see it.

Quote:
Originally Posted by till View Post
Thats sad as it breaks the compatibility with the existing ISPConfig 3 installations and will prevent that we add this patch to ispconfig main branch.
Yes, I am aware of it, but as I recall that was the only rational solution.
Actually I am pretty sure everything will continue to work for Apache too.
And we can always assume Apache is the default.

Last edited by eugenesan; 28th July 2009 at 09:58.
Reply With Quote
  #39  
Old 28th July 2009, 09:32
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
Default

Quote:
Yes, I am aware of it, but as I recall that was the only rational solution.
Actually I am pretty sure everything will continue to work for Apache too.
That depends on what you changed. If you changed the name of a database field e.g. the apache_directives field to webserver_directives, all installations with your patch can not be updated with a normal ispconfig update in future and are not able to install any of the bugfixes or possible future security fixes. If they would install an update or use the ispconfig update function, they would loose the complete server configuration in the database as of the incompatible db scheme.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #40  
Old 28th July 2009, 10:11
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
 
Default

Yes, here you right.

But, for example, if next update will include updates to both DB fields and references in code, we may solve the problem.

In addition you may consider adding my changes to next major release.
That way people who wish to evaluate nginx will use trunk or will have to wait for final release.
In future, people willing to move to that release, from older ISPC, will be required to perform minor adaptation to their DB.

Unfortunately I don't recall all changes I've performed and after I'll review final patch I may reply with concrete examples.

What do you think about my proposal?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:34.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.