debian uwsgi not built with ssl support - ssl

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 ...

Related

Reinstall rhn-client-tools with non working yum

For every yum command it will return SSL certificate error
Loaded plugins: fastestmirror, rhnplugin, security
The SSL certificate failed verification.
My SSL cert if valid.
I checked rhel site for https://access.redhat.com/solutions/93313 but the problem is i cannot reinstall rhn-client-tools since yum is actually not working and for some other reasons i cannot boot it from DVD/image.
Any tips on this?
Before trying to reinstall, have you also checked your firewall settings and the time and date setting on your server ?
If the firewall is not the issue, I would suggest a simpler approach, just by going to RH's site and downloading the appropriate rhn-client-tools RPM package, copying it to your server and installing it.
"What about the possible dependencies?" I foresee you asking...
Use a different server (or VM) with the same OS version that has access to the internet.
use yum with the download only plugin to only download all the needed dependencies (you must have the yum-plugin-downloadonly package installed beforehand) in a local directory like so:
yum install --downloadonly --downloaddir=<directory> <package>
Copy the packages downloaded at step #2 to your affected machine and install them using the rpm utility as so: rpm -ivh /path/to/yum/download/dir/*

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.

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.

Apache configure gives error invalid variable name: `with-ssl'

I need Apache2.4 with ssl.
AWS RHEL server I am using already has Apache2.2 and openssl 0.9 installed. I configured my Apache,apr,apr-util and pcre packages at /opt/products/apache2. everything is fine except the option
--enable-ssl
fails due to a dependency failure (openssl > 0.9.8a). No problem. I downloaded openssl 1.0.2a from open ssl and configured and installed it at /opt/openssl without problem.
Now I need to configure Apache with
--enable-ssl --with-ssl=/opt/openssl
but the configure command returns the error
"invalid variable name 'with-ssl'".
configure -help shows that with-ssl is an option.
Is this a bug or something? I don't find any reference on the internet.
Just wanted to update for anyone looking at this later.
Installing all the pre-requisites before configuring apache solves the problem of apache giving version error. So this command before the apache configuration solved the problem:
yum install gcc libxml2-devel gcc-c++ libicu-devel libxslt-devel bzip2 bzip2-devel libjpeg-devel libpng libpng-devel freetype freetype-devel curl curl-devel t1lib-devel unixODBC-devel openssl-devel openssl
and I did not have to install openssl separately.

How to setup php-fpm on CentOS 7?

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