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
  #1  
Old 27th December 2008, 19:08
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default ISPConfig3 support for external mail (Google Apps) and nginx as alternative webserver

Hi all,

Recently I was forced to migrate from dedicated to VPS.

Maybe I am too optimistic, but after small battle with low resources I've came with 3 decisions:

1) ISPConfig3 will be the CP (mydns support and single language code were main reasons).

2) Google Apps will replace mail subsystem (Saves tens of MB and solves spam headache). Therefore whole mail/spam supporting code must be disabled and replaced with simple DNS settings.

3) Nginx will be used instead of Apache.

Now, since I am pretty new to ISPConfig and a lot of work expected, it will be really nice to hear your ideas and if I'll have some luck even receive some code drafts from you ;-)

BTW: If some is interested I've built updated Ubuntu source for MyDNS 1.2.8.15.

Last edited by eugenesan; 30th January 2009 at 07:48.
Reply With Quote
Sponsored Links
  #2  
Old 27th December 2008, 22:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,070
Thanks: 826
Thanked 5,396 Times in 4,240 Posts
Default

2) There has no code to be changed. Just installl ispconfig 3 and then go to system > users and uncheck the checkbox for mail for the admin user.

3) Nginx is not supported, but you can write plugin for it which simply replaces the apache plugin. Just take a look at the apache plugin in /usr/local/ispconfig3/server/plugins-available/ and write a new plugin for nginx.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 27th December 2008, 22:58
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default

Thanks for the tip.

I am currently trying to understand relation between object/modules.
Are they all totally independent when items created?

For ex. when I add add site, does ISPC creates also DNS records for it?

Is ISPC will be affected by disabling all mail related services? Is it going to restart them at some point ad fail, lets say on DNS changes?
Reply With Quote
  #4  
Old 27th December 2008, 23:03
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,070
Thanks: 826
Thanked 5,396 Times in 4,240 Posts
Default

Quote:
Are they all totally independent when items created?
yes.

Quote:
For ex. when I add add site, does ISPC creates also DNS records for it?
no.

Quote:
Is ISPC will be affected by disabling all mail related services? Is it going to restart them at some point ad fail, lets say on DNS changes?
No. ISPConfig is a multi server control panel, ist is built so that services are independant and dont have to be installed on the same server or be installed at all.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 27th December 2008, 23:28
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default

Thanks for information.
After install script inspection, I've also noticed same level of modules separation on install stage, very smart!

Are there any plans for more "user-friendly" modules? Maybe some work already done in this area?

And are myDNS System->Server Config->Nameservers used as upstream DNS?

Automated DNS zone, as an option, on site creation would be really nice.
In addition two NS (ns1,ns2) records by default is good choice also.

BTW: 3rd version looks very nice and solid, nice work.
Reply With Quote
  #6  
Old 27th December 2008, 23:36
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,070
Thanks: 826
Thanked 5,396 Times in 4,240 Posts
Default

The modules are laready very user friendly. They are separated as this is nescessary and this will not be changed. Otherwise you would not be able to run ispconfig without mail system

Quote:
Automated DNS zone, as an option, on site creation would be really nice.
We will add some more wizards later.

Quote:
In addition two NS (ns1,ns2) records by default is good choice also.
Thats already included. Take a look at the dns wizard.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 28th December 2008, 00:06
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default

Looks like I was playing with too old version (3.0.0.7) :-(.

Just found latest RC :-)
Reply With Quote
  #8  
Old 31st December 2008, 14:58
eugenesan eugenesan is offline
Junior Member
 
Join Date: Dec 2008
Posts: 23
Thanks: 0
Thanked 8 Times in 5 Posts
Default

Hi all,

After many hours of learning, coding and testing I have nginx plugin for ISPC3.
Currently it lacks SSL support but I've added protected folders support, hope it can be easily extended for apache plugin.
I'll post it soon for review.

Meanwhile I am going to deal with automatic DNS creation.
Here I need help, what would be most rational way to perform that?
I was thinking of creating tasks for DNS creation when apropriate option selected on site creation.
How can I "stream" such an actions to sys_datalog?
Reply With Quote
  #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
The Following 2 Users Say Thank You to eugenesan For This Useful Post:
falko (1st January 2009), till (2nd January 2009)
  #10  
Old 2nd January 2009, 12:15
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,070
Thanks: 826
Thanked 5,396 Times in 4,240 Posts
 
Default

Hi,

thank you very much for the patch. I'am not able to add it to SVN at the moment as there is a feature freeze until the final version but I will add it as soon as the final gets released.

One problem that I see with the patch is that you renamed some fields in the database and the logging directory which breaks the compatibility to existing ispconfig installations so that an update will fail when the patch gets applied to svn. We will have to find a workaround for this or rename the fields and folders to its original names.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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 01:07.


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