Page 2 of 2

Re: only nginx?

Posted: Fri Mar 14, 2014 1:09 am
by ken
ninja0n3 wrote:While I think Vesta is a nice piece of software, waiting until June for the next version is a bit too much and I'm too impatient...

For those still interested, I've managed to get Nginx running on its own with php-fpm by replacing the vesta template files for nginx config files - now instead of running as proxy, it will run as the main server.
For more information on installing php-fpm, please refer to: https://www.digitalocean.com/community/ ... n-centos-6

You can have those files here along with the installation instructions: https://github.com/autronix/Vesta-0.9.8-with-nginx-only

Please note that the next update may break those files.

Hope this helps.
It's nice that Vesta is non-invasive like that so you can make such changes. Thanks for the contribution.

Re: only nginx?

Posted: Sun Mar 16, 2014 11:21 pm
by ninja0n3
As a word of caution, I would advise those who go the nginx + php-fpm route to modify their /etc/php-fpm.d/www.conf to the following (or change permissions accordingly):

Code: Select all

#php_value[session.save_path] = /var/lib/php/session
php_value[session.save_path] = /tmp
This seemed to prevent php sessions from being established.

Finally, as an added bonus, here is the config file for phpMyAdmin and phpPgAdmin (if you want to use postgresql) - in /etc/nginx/conf.d/your_server_ip.conf put the following:

Code: Select all

server {
        listen   xxx.yyy.zzz.aaa:80;
        server_name  _;
        error_log  /var/log/nginx/error.log error;

                location /phpMyAdmin {
                root /usr/share/;
                index index.php index.html index.htm;
                location ~ ^/phpMyAdmin/(.+\.php)$ {
                        try_files $uri =404;
                        root /usr/share/;
                        fastcgi_pass 127.0.0.1:9000;
                        fastcgi_index index.php;
                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        include /etc/nginx/fastcgi_params;
                }
                location ~* ^/phpMyAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                        root /usr/share/;
                }
        }
        location /phpmyadmin {
                rewrite ^/* /phpMyAdmin last;
        }

        location /phpPgAdmin {
                root /usr/share/;
                index index.php index.html index.htm;
                location ~ ^/phpPgAdmin/(.+\.php)$ {
                        try_files $uri =404;
                        root /usr/share/;
                        fastcgi_pass 127.0.0.1:9000;
                        fastcgi_index index.php;
                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        include /etc/nginx/fastcgi_params;
                }
                location ~* ^/phpPgAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                        root /usr/share/;
                }
        }
        location /phppgadmin {
                rewrite ^/* /phpPgAdmin last;
        }

        location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|exe|pdf|doc|xls|ppt|txt|odt|ods|odp|odf|tar|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
                root           /var/www/html;
                access_log     /var/log/nginx/access.log combined;
                access_log     /var/log/nginx/access.bytes bytes;
                expires        max;
                #try_files      $uri;
        }

        location ~ \.php$ {
                root           /var/www/html;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
                include        fastcgi_params;
        }

        location ~ /\.ht    {return 404;}
        location ~ /\.svn/  {return 404;}
        location ~ /\.git/  {return 404;}
        location ~ /\.hg/   {return 404;}
        location ~ /\.bzr/  {return 404;}
}
Hope this helps save a bit of trouble to those who are trying to use this method.

I have also managed to get Rails working with nginx+puma, if anyone wants more details, let me know.

Re: only nginx?

Posted: Mon Mar 17, 2014 12:55 am
by VestaLover
ninja0n3 wrote:While I think Vesta is a nice piece of software, waiting until June for the next version is a bit too much and I'm too impatient...

For those still interested, I've managed to get Nginx running on its own with php-fpm by replacing the vesta template files for nginx config files - now instead of running as proxy, it will run as the main server.
For more information on installing php-fpm, please refer to: https://www.digitalocean.com/community/ ... n-centos-6

You can have those files here along with the installation instructions: https://github.com/autronix/Vesta-0.9.8-with-nginx-only

Please note that the next update may break those files.

Hope this helps.
Totally agree on that. VestaCP has bright future here. Long live Open Source Control Panel :p
Anyway, Your NGINX hacks is a good alternative.

Re: only nginx?

Posted: Thu May 22, 2014 8:20 pm
by iraton
ninja0n3 wrote:While I think Vesta is a nice piece of software, waiting until June for the next version is a bit too much and I'm too impatient...

For those still interested, I've managed to get Nginx running on its own with php-fpm by replacing the vesta template files for nginx config files - now instead of running as proxy, it will run as the main server.
For more information on installing php-fpm, please refer to: https://www.digitalocean.com/community/ ... n-centos-6

You can have those files here along with the installation instructions: https://github.com/autronix/Vesta-0.9.8-with-nginx-only

Please note that the next update may break those files.

Hope this helps.
i managed to follow your instructions, replaced files and keep getting 500 error. php-fpm, nginx runing, apache stopped

Re: only nginx?

Posted: Wed Aug 13, 2014 12:01 am
by mrjay
iraton wrote:
ninja0n3 wrote:While I think Vesta is a nice piece of software, waiting until June for the next version is a bit too much and I'm too impatient...

You can have those files here along with the installation instructions: https://github.com/autronix/Vesta-0.9.8-with-nginx-only

Please note that the next update may break those files.

Hope this helps.
i managed to follow your instructions, replaced files and keep getting 500 error. php-fpm, nginx runing, apache stopped
Here the same problem as iraton getting 500 error for php-fpm requests...

Re: only nginx?

Posted: Fri Sep 25, 2015 9:54 am
by ludwig
Is it possible to use vestacp with only nginx yet?

I couldn't get it working using the files provided on Github (see the previous post).
I get 502 when apache is stopped. When I remove the line

Code: Select all

proxy_pass  http://84.200.44.180:8080;
in /etc/nginx/conf.d/my_ip.conf I get 400.

Re: only nginx?

Posted: Fri Sep 25, 2015 2:50 pm
by skurudo
ludwig wrote:Is it possible to use vestacp with only nginx yet?
Yes, but you need to decide what will you do after nginx? Nginx can't execute nothing more than html, you need something like php-fpm at least.