Vesta cesspit: Difference between revisions

From eddynetweb's cesspit
Jump to navigation Jump to search
(Restructure page!)
m (Eddynetweb moved page VestaCP 502 gateway on sub.domain.tld to Vesta cesspit without leaving a redirect: Restructure wiki.)

Revision as of 15:43, 11 March 2017

Documenting Vesta Control Panel errors since forever.

502 gateway error on sub.domain.tld

Information when proxying away from port, causes above error.

Issue


I was recently configuring VestaCP to bind to a specific sub-domain without requiring a port when I came across the following issue:

502 Bad Gateway

Looking around, I found a solution.

Solution


Simply visit the below directory with your choice of text editor:

/usr/local/vesta/php/etc/php-fpm.conf

Then simply look for the following block:

; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions.
; Default Values: user and group are set as the running user
; mode is set to 0666
listen.owner = admin
listen.group = admin
listen.mode = 0660

...and change listen.group = admin to listen.group = www-data

Why? The web server by default will attempt to read the directory, and since www-data had not been given authorization, it will return a 502 Gateway error. Changing it to www-data will allow apache2 to read the VestaCP directory.