How to setup php-fpm on CentOS 7? - apache

There are a lot of guides out there about setup php-fpm for Apache on CentOS 5x or 6x but none of them are working on Centos 7. I searched for days but can't find any solution.
yum install php-fpm
This command succesfully working.
But then i stuck with this line:
yum install mod_fastcgi
The error is "There is no package as mod_fastcgi"
Is there any mod_fastcgi module compatible with CentOS 7? If so, how can i complete php-fpm setup? Please guide me.
My server have some trouble about memory usage. So i have to optimize Apache. Here is my "top" result.

Deploy PHP with FastCGI
If you are using PHP code with your application, you will need to implement “PHP-FastCGI” in order to allow Nginx to properly handle and parse PHP code. You can install this via YUM from the EPEL repository that was previously installed:
yum install php-cli php spawn-fcgi

Related

Homebrew PHP Install Breaks Apache 2.4

When I recently installed PHP56 via Homebrew, Apache would no longer start, with this error in the logs:
Cannot load /usr/local/opt/php56/libexec/apache2/libphp5.so into server: dlopen(/usr/local/opt/php56/libexec/apache2/libphp5.so, 10): image not found
Note: I'm running Apache 2.4 on Mac El-Capitan.
How can I resolve this error and get Apache running again?
I've seen this before. If you brew options php56, it says:
With the release of macOS Sierra the Apache module is now not built by default. If you want to build it on your system
you have to install php with the --with-apache option. See brew options php56 for more details.
Thus, try uninstalling (brew uninstall php56) then reinstalling php56 with the flag --with-apache for Apache v2.4.x (--with-apache22 for Apache 2.2). Generally, you can check your Apache version by typing in command line: httpd -v.
My version is 2.4.18, so I would brew install php56 --with-apache, which creates the proper file path /usr/local/opt/php56/libexec/apache2/libphp5.so.
Now, it is properly compiled with Apache Handler module.
IMPORTANT: installing php56 with this option appears to also install httpd24. From a brew program stance, this makes sense. However, this may break your server set up. If you don't want to use brew's Apache install, do a brew unlink httpd24 after this.
To see additional brew build options, try brew options php56.

Apache is viewing php files as texts

After I updated to php7.0 now it's viewing the files, I firstly thought it was in apache itself, but i have reinstalled it, what could be the problem..?
ubuntu 15.04
Install PHP 7 and the Apache PHP module as follows:
apt-get -y install php7.0 libapache2-mod-php7.0
Then restart Apache:
service apache2 restart
Another possible reason could be short open tag. Configure php.ini files related line as: short_open_tag = On and restart php service.

Installing Cobbler on Ubuntu 15.10 seems to break apache, how can I fix this?

I am trying to install Cobbler on a brand new Ubuntu 15.10 virtual box but it is not working. When I run the apt-get install cobbler cobbler-web it seems to break apache completely to the point I can't get it working again.
I see this in the apache error log:
[wsgi:crit] [pid 8112:tid 140273573488512] mod_wsgi (pid=8112): The mod_python module can not be used on conjunction with mod_wsgi 4.0+. Remove the mod_python module from the Apache configuration.
and this in the auth.log:
polkitd(authority=local): Unregistered Authentication Agent for unix-process:8081:54865 (system bus name :1.24, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
I have tried removing the mod_python and wsgi modules but apache still doesn't start up. And I think Cobbler uses them anyways, so I kind of need them.
I have also tried disabling polkitd. I don't find any clues when searching for that weird error message.
I was able to install Cobbler on Ubuntu 14.04 pretty easily and apache works fine.
Here is the basic chain of install commands I used:
apt-get update
apt-get install apache2
apt-get install isc-dhcp-server
apt-get install bind9 bind9utils bind9-doc
apt-get install cobbler cobbler-web debmirror mkisofs
Disable the module by typing sudo a2dismod python
You should then see this:
Module python disabled. To activate the new configuration, you need to
run: service apache2 restart
So type sudo service apache2 restart.
If that doesn't fix it, check the error log for more information by typing
cat /var/log/apache2/error.log.

Centos 6.7 install PHP module for Apache

Im using a vagrant build vm and trying to install mod_php.
yum install mod_php
.....
Error: php70u-common conflicts with php-common-5.6.17-1.el6.remi.x86_64
Error: httpd24u conflicts with httpd-2.2.15-47.el6.centos.1.x86_64
Error: httpd24u-tools conflicts with httpd-tools-2.2.15-47.el6.centos.1.x86_64
I guess hes trying to download the module for php 7?
How can i install it for php 5.6?
you're installing the wrong version of mod_php. try: yum install mod_php70u

debian uwsgi not built with ssl support

i recently installed uwsgi 2.0.3 on debian via aptitude.
now i am trying to run the default websocket example, but the log tells me:
you need to build uWSGI with SSL support to use the websocket handshake api function !!!
[uwsgi-perl error] unable to complete websocket handshake at ...
I am a bit puzzled, since i cannot find a ssl-plugin and i can't see any options to turn on/off ssl-support. I really want to stick with aptitude, installing uwsgi manually is not preferred, beside i have no clue how to enable it manually either.
Does anyone know how to enable uwsgi-ssl support in debian the aptitude way?
btw.
i also removed uwsgi with aptitude remove --purge uwsgi
installed libssl-dev and reinstalled uwsgi
but without luck :(
You must compile uwsgi yourself if you want the SSL support. Debian hasn't packaged a version of uwsgi with SSL support. I know, it's annoying for updates ... but you haven't the choice.
You just need to run apt-get install build-essential python python-dev libssl-dev, then python uwsgiconfig.py ...