Can you replace the apache with nginx? If it is possible,How to?
-
-
Atm it's not possible out of the Box. But we are working on it
-
-
You can use Apache+NGINX as front end/back end.
-
When you add it yourself, maybe you can provide a Patch
-
-
When you add it yourself, maybe you can provide a PatchThis patch was created for ISP-Control Omega in Russian Corner by developer Koffu. This patch is a script that can generate nginx.conf and vhost.conf. I tested on Omega, Easyscp and IMSCP.But in the IMSP configuration is different from the other panels listed above.
Documentation you can find this (only Russian lang). If you need help, you can turn to DragonZX.
I hope that your team will help Omega & Easyscp in development.P.S. Sorry for my bad English
-
Thanks for the informations.
But we have a lot of doings in i-MSCP. There is no time to develop for other panels.
And If you have a look in the history of ispcp you will find out that some Dev left this project and now they are working for i-MSCP.
EasyCP is the same like ispcp. Yes... Some issues are fixed there, but nothing else. And they moved to smarty...
If you have time, so you can translate us the instruction from russia to english.
That will be a good work.. -
-
OK. This is my translation of tutorial. Sorry for my bad English.
1. Install mod_rpaf:edit rpaf-2.0.load:
Restart Apache2:Quote
!!!!!###################################################!!!!![size=large]NOTE:[/size] In repositories of Debian nginx has version 0.7.67, but him is very old.
You can use last version if append the following to the end of the
/etc/apt/sources.list file:PHP- deb http://nginx.org/packages/debian/ squeeze nginxdeb-src http://nginx.org/packages/debian/ squeeze nginx[/php][s]But if you use this solution -module will not work. Because starting with version 1.1.8:[quote]*) Change: the "limit_zone" directive was superseded by the "limit_conn_zone" directive with a new syntax.[/quote]So, the patch needs to be a small fix.In tutoial we use first solution - use old version of nginx[/s]!!!!!###################################################!!!!![/quote][size=x-large][color=#FF0000]Important[/color][/size] See [url=http://forum.i-mscp.net/Thread-HOWTO-Can-you-replace-the-apache-with-nginx?pid=6737#pid6737][u]this post[/u][/url]2. Install nginx:[code]# aptitude install nginx
3. Create mysql-user nginx in database:
Code- # mysql -u root -p Enter root's passwordmysql> USE imscpmysql> grant select on imscp.domain to 'nginx'@'localhost' identified by 'your_password_for_nginx';mysql> grant select on imscp.subdomain to 'nginx'@'localhost' identified by 'your_password_for_nginx';mysql> grant select on imscp.domain_aliasses to 'nginx'@'localhost' identified by 'your_password_for_nginx';
4. Configure rotation logs of nginx:
contents of the file is replaced by:PHP- /var/log/nginx/*.log { daily missingok rotate 20 compress delaycompress notifempty create 640 root adm sharedscripts postrotate if [ $(ps ax | grep nginx | grep -v grep | wc -l) = "0" ]; then killall -s HUP nginx; fi endscript }[/php]5. Download script (patch) for configure nginx:[code]# cd /usr/local/src# wget http://testino.ru/dir/ispcp-nginx.zip# unzip ispcp-nginx.zip# cd ispcp-nginx# chmod +x ispcp-nginx.pl# nano ispcp-nginx.conf
find lines:
delete default.conf:
Now we generate new nginx config:[size=large]!!!!STOP!!!STOP!!!STOP!!!![/size]
This script (patch) is for isp-control. We must adapted for IMSCP.
Edit ispcp-nginx.pl:
Go to line 33:PHP- .......open (CFG,"/etc/ispcp/ispcp.conf") || die "Can't open ispcp configuration file /etc/ispcp/ispcp.conf!: $! ";.......[/php]replace this line on:[code=php]open (CFG,"/etc/imscp/imscp.conf") || die "Can't open imscp configuration file /etc/imscp/imscp.conf!: $! ";[/php]go to line 169:[code=php]..... root /var/www/ispcp/gui/;.....[/php]replace this line on:[code=php] root /var/www/imscp/gui/;[/php]Run this script (patch):[code]# ./ispcp-nginx.pl
Make changes to config files for apache2, to nginx auto configured itself:
find sub restart
and place linePHP- system('/etc/nginx/ispcp-nginx.pl');[/php]do as in the illustration:[img]http://s019.radikal.ru/i617/1205/24/866f6336d237.jpg[/img][quote][size=large]!!!!NOTE:[/size]It may be wrong, because the logic is different from the other panels (Omega, Easyscp).When I configured on Omega & Easyscp I placed this line [quote]system('/etc/nginx/ispcp-nginx.pl');[/quote] to /var/www/ispcp/engine/ispcp-serv-mngr in [code=php]sub restart_httpd{....}[/php].[/quote]4. For monitoring nginx in IMSCP you must do this:[code]# mysql -u root -p
Enter root's password
where 192.168.1.225 - is ip of server.5. Add iptables rules:
where 192.168.1.225 - is ip of your server.6. Reboot your server:
P.S. If you make changes in this patch, please share with the development for Omega & Easyscp.
P.P.S. Author of this patch is koffu. Documentation and tested by Russian Corner of Omega
On the basis of: testino.ru -
Thank you for the Howto.
I will take a look inside. Maybe it's possible to add the Patch tp the installtion Process of i-MSCP. So user can choose during install or Upgrade, to enable nginx
Edit:
On Wheezy we have: nginx 1.1.19-1
-
-
Anyone tested it?
-
i don't test it atm, because my server running Master Version.
I wil se, how to add this to i-MSCP Installation.
-