Vesta cesspit: Difference between revisions
Jump to navigation
Jump to search
Eddynetweb (talk | contribs) (Addressing specific issue!) |
Eddynetweb (talk | contribs) m (Fixing listen code!) |
||
Line 14: | Line 14: | ||
Then simply look for the following block: | Then simply look for the following block: | ||
<source lang=" | <source lang="php"> | ||
; Set permissions for unix socket, if one is used. In Linux, read/write | ; 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 | ; permissions must be set in order to allow connections from a web server. Many |
Revision as of 15:33, 5 March 2017
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.