Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: authz_core: error |
|
Author |
|
arx
Joined: 17 May 2021 Posts: 2 Location: italia
|
Posted: Mon 17 May '21 13:53 Post subject: authz_core: error |
|
|
I am new to this forum, I do not know if it is the correct category but since it centers the php I wrote here.
I installed a php 7.4 apache 2.4 server on centos 7 to manage an opensource application https://github.com/goautodial/v4.0, it has its repositories that partially modify the apache conf files.
I have a problem as I have to add a portal always in php 7.4 created the project with lavarel 7, in order not to create problems with
.htaccess I put it in / var / spool / easycrm, I created a new virtualhost in conf.d and I added a port 8443 with a new host name and certificates.
Listen 8443 https
Alias /easycrm /var/spool/easycrm/public
<VirtualHost *:8443>
ServerName mydns
ServerAlias mydns
DocumentRoot /var/spool/easycrm/public
DirectoryIndex index.html index.php
SSLEngine on
SSLCertificateFile /etc/ssl/personali/ca-bundle.txt
SSLCertificateKeyFile /etc/ssl/personali/private-key.txt
<Directory /var/spool/easycrm>
Options Indexes FollowSymLinks MultiViews
AllowOverride none
Require all granted
</Directory>
</VirtualHost>
first problem when I go to nomedns: 8443 instead of exiting the new portal I always get the site under / var / www / html, so I added the alias.
second problem: I put the alias and I get "file not found" I go to see in the logs and I exit "" [authz_core: error] [pid 19524] [myip client: 54924] AH01630: client denied by server configuration: / var / spool / easycrm ""
doing some research on google it turns out that the problem is the php-fpm
i looked and in the con.d there is a fpm.conf file with it inside
# PHP scripts setup
ProxyPassMatch ^ / (. *. Php) $ fcgi: //127.0.0.1: 9000 / var / www / html
Alias / / var / www / html /
disabling it obviously gives me an error.
in access.log: "GET / easycrm / HTTP / 1.1" 404 16 "-" "Mozilla / 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit / 537.36 (KHTML, like Gecko) Chrome / 90.0.4430.212 Safari / 537.36"
in error.log: [proxy_fcgi: error] [pid 32259] [client ipclient: 58280] AH01071: Got error 'Primary script unknown'
even if I delete .htaccess of the primary site, everything remains the same.
i also enabled
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disabled
UserDir enabled
#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
UserDir public_html
</IfModule>
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>
but nothing
if you ask me other configuration files I will gladly post them
how can i do to solve this problem ? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 19 May '21 22:17 Post subject: |
|
|
Since /var/spool/easycrm/public is your document root,
ProxyPassMatch ^ / (. *. Php) $ fcgi: has to point to the same directory and not /var/www/html |
|
Back to top |
|
arx
Joined: 17 May 2021 Posts: 2 Location: italia
|
Posted: Thu 20 May '21 9:27 Post subject: |
|
|
James Blond wrote: | Since /var/spool/easycrm/public is your document root,
ProxyPassMatch ^ / (. *. Php) $ fcgi: has to point to the same directory and not /var/www/html |
but if I change then what is inside doesn't work
I can add another php-fpm configuration in the virtualhost I need, already tried but it doesn't work |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 24 May '21 8:57 Post subject: |
|
|
mod_fcgid is much easier to set up
in each vhost
Code: |
<Files ~ "\.php$">
Options Indexes FollowSymLinks ExecCGI
AddHandler fcgid-script .php
FCGIWrapper "/usr/bin/php-cgi8.0" .php
</Files>
|
In our tutorial you find more info. https://www.apachelounge.com/viewtopic.php?t=2394
If you still have a question please ask again. |
|
Back to top |
|
|
|
|
|
|