New in CWP Edge / LTSFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers. Available now in the Edge-Latest and LTS-Stable versions. Discuss in the forum

LSPHP / Cache ›
CWP Secure KernelKernel-level protectionEvery site in its own sandbox

Every PHP site, cron job and SSH session runs in its own profile that the kernel enforces. A hacked WordPress cannot read other accounts’ files, and crypto miners and unexpected processes are stopped. Discuss in the forum

Secure Kernel ›
CWP DataCenter PanelFree for CWPpro serversAll your servers on one screen

Manage all your CWP servers from one panel: live health, every hosting account, CWP and OS updates on many servers at once, backups, SSL, firewall and Telegram alerts. Discuss in the forum

DataCenter Panel ›
CWP Backup ServerFree for CWPpro serversBackups that ransomware cannot reach

Protected backups of all your CWP servers on a separate machine. Snapshots a hosting server cannot delete, and restore of files, databases, mail and whole accounts in the admin and user panel. Discuss in the forum

Backup Server ›
WordPress ManagerIncluded & freeWordPress managed from the panel

Install, secure, update, back up and clone WordPress sites without FTP. Updates are tested on a staging clone first and applied to the live site only when they pass, with a backup taken first. Discuss in the forum

WordPress Manager ›
CWP CageIsolationEvery account in its own cage

Per-account isolation built from Linux namespaces and cgroups. A break-in or a runaway script on one site cannot reach another account, the panel or the rest of the server; resource limits per hosting package. Discuss in the forum

CWP Cage ›
Script InstallerOne-click appsWordPress, Joomla, Moodle and more in one click

CWP’s own script installer in the user panel: pick an app, choose the domain and folder, and it is live in seconds with its database and admin login created automatically. Ready for LSPHP and LSAPI-Cache. Discuss in the forum

Script Installer ›
DNS ClusterFor every control panelOne DNS cluster for all your servers

Your servers keep creating domains as usual; the zones are collected into one authoritative PowerDNS cluster you control, with DNSSEC, roles and a full activity trail. Accepts CWP, cPanel, Plesk, DirectAdmin and BIND. Discuss in the forum

DNS Cluster ›
CWP BillingFree to useBilling and support system for hosting providers

Clients, services, invoices, payments, domains, server provisioning and support tickets in one place. All gateways, server modules and registrars are free, with free migration from WHMCS, ClientExec and Blesta. Discuss in the forum

CWP Billing ›
CWPproFrom $1.49 per monthEvery CWP feature unlocked

CWPpro is the professional version of Control Web Panel: all features, unlimited accounts, the latest CWP version and security fixes first. $1.49 per month or $11.99 per year. Discuss in the forum

Get CWPpro ›

PHP not work at Nginx & Varnish & Apache (php-fpm)

Started by skyref, July 11, 2019, 06:02:45 PM

Previous topic - Next topic

skyref

Apache don't read php files. I got:

Not Found
The requested URL /index.php was not found on this server.


The file exist, permissions are ok. Server read from user directiories, html files works ok.
PS. Default instalation don't set right ports for apache...

/etc/httpd/logs/error_log

[Thu Jul 11 19:36:36.826031 2019] [mpm_prefork:notice] [pid 5158] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips configured -- resuming normal operations
[Thu Jul 11 19:36:36.826045 2019] [core:notice] [pid 5158] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu Jul 11 19:40:58.587454 2019] [autoindex:error] [pid 5159] [client 127.0.0.1:38370] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
[Thu Jul 11 19:41:49.077536 2019] [autoindex:error] [pid 5161] [client 127.0.0.1:38386] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive


I don't know, why it want generate server directory index, but i have index.php at user directory, which I want set up. when i put index.html all works ok, but I can't run any php no matter that it is index or other file

skyref

I found also, that it don't generate users cfg for socket to php-fpm. (I copy nobody and change cfg to user name) after that socket for user appear.
I suppose that is problem with php-fpm config or with apache cfg how use cwp-phpfpm (at that name php-fpm show).

skyref

I found at /var/log/cwp/webservers.log:

2019-07-12 12:07:07 domain.xyz Varnish: SUCCESS conf enabled template: default
2019-07-12 12:07:07 domain.xyz Apache: SUCCESS conf enabled
2019-07-12 12:07:07 domain.xyz Apache SSL: SUCCESS conf enabled template: php-fpm/default
2019-07-12 12:07:07 user PHP-FPM php-fpm71: ERROR failed at quota or security limits
2019-07-12 12:07:07 user PHP-FPM php-fpm73: ERROR failed at quota or security limits
2019-07-12 12:07:08 PHP-FPM php-fpm71: reload
2019-07-12 12:07:08 PHP-FPM php-fpm73: reload


I think that is connected with problem, but i don't know what/where check and change.

skyref

#3
problem from log solved but still php scripts don't work:

Not Found
The requested URL /index.php was not found on this server.


I checked and it show php file from /var/www/html but as plain text. PHP don't interprete it.

Where could be wrong location set per user? My config is rather default only few changes to resolve problems.. And why php not work ? Why php files are shows from other location ?

studio4host

cwp is not using this location /var/www/html you have something bad configured there.
Probably the best would be for you to contact cwp support.

VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

skyref

#5
It is default config when you choose force php-fpm  at webservices php-fpm... (when choose without force but also php-fpm it is the same problems)
I tried new VM and got the same results. Default config also not set sockets to users, bad users, bad listen ports. Default nginx- varnish not work, varnish - apache also. Apache try listen the same ports as nginx... Already i repaired it, but still something is wrong with nginx-> php-fpm or apache->php-fpm. Yes i tried both default servers config from panel.

And when you choose php fpm you need also configure each domain othervise get bad gateway. It is not work out of box...
I will not pay for smth that should work.

This problems looks like still actual:

http://forum.centos-webpanel.com/php/php-fpm-socket-not-create/
http://forum.centos-webpanel.com/php/php7-17-2-where-is-the-php-fpm-server/
http://forum.centos-webpanel.com/php/php-fpm-not-generating-user-config-file/
http://forum.centos-webpanel.com/php/php-not-working-for-new-account/
http://forum.centos-webpanel.com/php/error-503-for-wordpress-on-php-fpm-7-3-4/
https://www.icozens.com/cwp-502-bad-gateway-cwpsrv/
https://forum.centos-webpanel.com/php/configure-php-7-with-nginx-in-cwp/
http://forum.centos-webpanel.com/centos-webpanel-bugs/php-switcher-fails-to-install-phpvx-php-fpm-and-dependencies/
http://forum.centos-webpanel.com/php/php-version-vs-php-fpm-version/
http://forum.centos-webpanel.com/php-selector/php-fpm-not-working-(503-service-unavailable)/msg24312/#msg24312
http://forum.centos-webpanel.com/php/php-fpm-and-apache2-issue/msg20319/#msg20319