When I change the startup user for Apache and php-fpm, I get error 503 index.php access and Apache error
OS:Amazon linux 2023 Selinux: Enforcing Apache version:2.48 php version:8.2 change to user:apps groups:appsgrp
Folder:/var/local/app Owner:apps:appsgrp
/etc/httpf/conf/httpd.conf
ServerRoot "/etc/httpd"
Listen 8443
Include conf.modules.d/*.conf
User apps
Group appsgrp
ServerAdmin root@localhost
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/local/app/httpd/html"
<Directory "/var/local/app/httpd">
AllowOverride None
Require all granted
</Directory>
<Directory "/var/local/app/httpd/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/local/app/httpd/cgi-bin/"
</IfModule>
<Directory "/var/local/app/httpd/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
I just changed the user and group fields in this file.
/etc/php-fpm.d/conf/www.conf
user apps
group appsgrp
error info
I've tried to set the permissions of a lot of directories, but they still get errors, so I don't know where the problem is?