only nginx?
Re: only nginx?
It's nice that Vesta is non-invasive like that so you can make such changes. Thanks for the contribution.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.
Re: only nginx?
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):
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:
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.
Code: Select all
#php_value[session.save_path] = /var/lib/php/session
php_value[session.save_path] = /tmp
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;}
}
I have also managed to get Rails working with nginx+puma, if anyone wants more details, let me know.
-
- Posts: 36
- Joined: Thu Dec 05, 2013 10:55 am
Re: only nginx?
Totally agree on that. VestaCP has bright future here. Long live Open Source Control Panel :pninja0n3 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.
Anyway, Your NGINX hacks is a good alternative.
Re: only nginx?
i managed to follow your instructions, replaced files and keep getting 500 error. php-fpm, nginx runing, apache stoppedninja0n3 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.
Re: only nginx?
Here the same problem as iraton getting 500 error for php-fpm requests...iraton wrote:i managed to follow your instructions, replaced files and keep getting 500 error. php-fpm, nginx runing, apache stoppedninja0n3 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.
Re: only nginx?
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 in /etc/nginx/conf.d/my_ip.conf I get 400.
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;
Re: only nginx?
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.ludwig wrote:Is it possible to use vestacp with only nginx yet?