Problem to show PHP websites with new server

dirux

Verified User
Joined
Dec 28, 2019
Messages
17
Hi,

We have a lot of problem with nginx_apache on a new server. We get this in the error log.

2020/04/07 00:03:59 [error] 356734#0: *37 open() "/home/---/domains/---/private_html/wp-includes/js/zxcvbn.min.js.gz" failed (13: Permission denied), client: ---, server: ---, request: "GET /wp-includes/js/zxcvbn.min.js HTTP/2.0", upstream: "https://---:8081/wp-includes/js/zxcvbn.min.js", host: "---", referrer: "https://---/wp-login.php?redirect_to=https://---/wp-admin/&reauth=1"
2020/04/07 00:03:59 [error] 356734#0: *37 open() "/home/---/domains/---/private_html/wp-includes/js/zxcvbn.min.js" failed (13: Permission denied), client: ---, server: ---, request: "GET /wp-includes/js/zxcvbn.min.js HTTP/2.0", upstream: "https://---:8081/wp-includes/js/zxcvbn.min.js", host: "---", referrer: "https://---/wp-login.php?redirect_to=https://---/wp-admin/&reauth=1"

We have trying to put all in the folder with the 755 and 777 but still getting the same error. We have also trying to run ./build nginx_apache but nothing help... Please anyone that having the same problem?
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
403
Location
UA
check files ownership,
also create simple php script with next code and open in browser to check are scripts running from appropriate user:
<?php
system(id);
?>
(maybe you will need to remove "system" from disable_functions in php.ini)
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,329
Location
LT, EU
I think it's likely that /home/user is chmod 710 or so, try chmod 711 for it :)
 

dirux

Verified User
Joined
Dec 28, 2019
Messages
17
Hi,

I solved the case! - Here is how to fix the problem.

Please reset permissions by executing the following commands:
cd /usr/local/directadmin/scripts ./set_permissions.sh

all and rewrite configuration afterwards with the following commands:
cd /usr/local/directadmin/custombuild
./build update
./build rewrite_confs
 
Top