HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   ISPConfig3 plugable mail subsystem (for Google Apps) and nginx as alternative (http://www.howtoforge.com/forums/showthread.php?t=29807)

eugenesan 27th December 2008 19:08

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.

till 27th December 2008 22:37

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.

eugenesan 27th December 2008 22:58

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?

till 27th December 2008 23:03

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.

eugenesan 27th December 2008 23:28

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.

till 27th December 2008 23:36

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.

eugenesan 28th December 2008 00:06

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

Just found latest RC :-)

eugenesan 31st December 2008 14:58

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?

eugenesan 31st December 2008 17:30

1 Attachment(s)
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.

till 2nd January 2009 12:15

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.


All times are GMT +2. The time now is 04:16.

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