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

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.

Related

Apache, mod_ssl and "No recognized SSL/TLS toolkit detected"

I have open ssl installed downloaded from github. Apache 2.X has a problem compiling, any suggestions.
Output of Apache build script:
checking whether to enable mod_ssl... checking dependencies
checking for SSL/TLS toolkit base... none
checking for OpenSSL version... checking openssl/opensslv.h usability... no
checking openssl/opensslv.h presence... no
checking for openssl/opensslv.h... no
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
no OpenSSL headers found
checking for SSL-C version... checking sslc.h usability... no
checking sslc.h presence... no
checking for sslc.h... no
no SSL-C headers found
configure: error: ...<br>No recognized SSL/TLS toolkit detected
You have install the openssl libssl-dev packages:
apt-get install openssl libssl-dev
I have open ssl installed downloaded from github. Apache 2.X has a problem compiling, any suggestions.
$ ./configure --help | grep -i ssl
--enable-ssl SSL/TLS support (mod_ssl)
--enable-ssl-staticlib-deps
link mod_ssl with dependencies of OpenSSL's static
Must be specified in addition to --enable-ssl.
--with-sslport=SSLPORT Port on which to securelisten (default is 443)
--with-ssl=PATH OpenSSL installation directory
So, it looks like you need:
./configure --enable-ssl --enable-ssl-staticlib-deps --with-ssl=<path to your OpenSSL>
I would probably --enable-ssl-staticlib-deps. It will keep you out of hot water with loading the wrong libssl and libcrypto shared objects (namely, the ones in /usr/lib). You can omit it, but you need to know how to modify LD_LIBRARY_PATH.
Yes. Done that. It is complaining that I don't have right SSL/TLS Kit where I have latest compiled and installed in /usr/local/ssl. Packages were downloaded from openssl.org. Openssl in bin is working fine issuing certificate and so on .. not sure what apache build script is looking for yet ..
Try installing the openssl package using following.
$sudo /usr/bin/yum install openssl*
This will install additional pkgs shown below.
openssl-devel
openssl-perl
openssl-static
This resolved the issue for me. Good Luck

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

Passenger Apache Module install - installer not finding installed libraries

I am trying to host a Rails app, in a VPS server. The server already, has Apache, installed, so I am trying to install passenger first, then passenger-apache-module.
I have installed RVM as the user, and ruby 1.9.3 and set it as the default ruby. Then, I installed passenger gem, version 3.0.17, as we are migrating the rails app, and the passenger version in the old server is 3.0.17. I was able to install passenger gem with the command gem install passenger -v 3.0.17.
After installing passenger, I went ahead and tried to install passenger-apache-module using the passenger-install-apache2-module command. I am getting this output:
Checking for required software...
* GNU C++ compiler... not found
* Curl development headers with SSL support... not found
* OpenSSL development headers... not found
* Zlib development headers... not found
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /home/federaltitle/.rvm/wrappers/ruby-1.9.3-p448/rake
* rack... found
* Apache 2... found at /usr/local/apache/bin/httpd
* Apache 2 development headers... found at /usr/bin/apxs
* Apache Portable Runtime (APR) development headers... found at /usr/local/apache/bin/apr-1-config
* Apache Portable Runtime Utility (APU) development headers... found at /usr/local/apache/bin/apu-1-config
Some required software is not installed.
But don't worry, this installer will tell you how to install them.
Press Enter to continue, or Ctrl-C to abort.
When I hit Enter, I am getting this output:
Installation instructions for required software
* To install GNU C++ compiler:
Please run yum install gcc-c++ as root.
* To install Curl development headers with SSL support:
Please run yum install curl-devel as root.
* To install OpenSSL development headers:
Please run yum install openssl-devel as root.
* To install Zlib development headers:
Please run yum install zlib-devel as root.
If the aforementioned instructions didn't solve your problem, then please take
a look at the Users Guide:
/home/federaltitle/.rvm/gems/ruby-1.9.3-p448/gems/passenger-3.0.17/doc/Users guide Apache.html
But, when I try to install the libraries mentioned in the message (yum install gcc-c++, yum install curl-devel, yum install openssl-devel, yum install zlib-devel) as root user, it is saying all the libraries are already installed and up-to-date.
Server Details
OS - CENTOS 6.4 x86_64
I was able to install the rvm, ruby and passenger as root, and the issue was fixed. Something to do with permission, when done as user. But I had to do some workarounds for the user related activities on the ruby part like bundle install, rake assets:precompile (had to do this as root, so gave sudo permission for the local user to perform these).

(httpd) Getting some problems with Mod_security Installation

I'm using Webuzo on my first unmanaged VPS (CentOS 6.4,OpenVZ). I tried to install Mod_Security following this guide. I installed Modsecurity-apache_2.6.6 but there's a problem in Step3 that prevents me from installing OWASP Mod_Security Core Rule Set
wget http://www.modsecurity.org/download/modsecurity-apache_2.6.6.tar.gz
The Download address has been removed. So I found another guide for the rule set but I can't get this command to work
git clone https://github.com/SpiderLabs/owasp-modsecurity-crs.git
It returns "-bash: git: command not found"
What command should I use to get OWASP CRS?
Also, I suspect the mod_security installation is incomplete since httpd server is unable to restart after installing modsecurity. Here's the configuration error:
[root#xx ~]# httpd -t
Syntax error on line 7 of /etc/httpd/conf.d/modsecurity.conf:
Invalid command 'SecRuleEngine', perhaps misspelled or defined by a module not included in the server configuration
Should I uninstall Mod_Secuirty first since everything seems to have become a mess now?
Any help is appreciated.
The apache binary in case of Webuzo is located at /usr/local/apps/apache and the modules are located at /usr/local/apps/apache/modules/lib.
Also the apache configurations in case of Webuzo are located at /usr/local/apps/apache/etc/ and /usr/local/apps/apache/etc/conf.d/
It seems you are trying to compile mod_security at an inappropriate location.
As you are having error with modsecurity.conf, I wonder whether you have followed the step
Step 4: Configuring Mod_Security
In the guide you have followed.
"-bash: git: command not found"
This error can be resolved by installing the package that includes git. try
yum install git-core -y
Both guide1 and guide2 are good to install mod_sec and follow any one. :)

Apache installation; libpcre error

When installing Apache on Ubuntu 11.10, I get the following error:
configure: error: APR not found. Please read the documentation.
I followed the instructions here, then, I get the error below:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
What am I doing wrong and how can I resolve it?
1. Download PCRE from PCRE.org
2. Compile it with a prefix and install it:
./configure --prefix=/usr/local/pcre
make
make install
3. Go back to where your Apache installation is and compile Apache with PCRE:
--with-pcre=/usr/local/pcre
For me (Fedora Linux), it was enough to just install the pcre-devel: yum install -y pcre-devel. Didn't even have to use --with-pcre afterwards.
Debian
In a clean installation of Debian 9.5, during the installation of Apache it is necessary to have some packages and libraries to avoid errors. Next I show the type of error and its respective solution
Configuration
configure: error: no acceptable C compiler found in $PATH
$ sudo apt-get install build-essential
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
$ sudo apt-get install libpcre3-dev
Then I make the configuration indicating that it is installed in the path /usr/local and not in /usr/local/apache2, otherwise I will have library errors. The idea is that the libraries created for httpd end in /usr/local/lib so that the dynamic linker knows them.
$ configure --prefix /usr/local
Compilation
And for the compilation the following the installation of some packages also would avoid us errors in a clean installation of Debian.
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory.
$ sudo apt-get install libexpat1-dev.
It is recommended to use the -j3 parameter to make the compilation faster. Although it could also be ignored.
$ make -j3
I was other problem compiling apache2 in CentOS with pcre. I installed pcre in other location "/custom/location/pcre" and configure command throw the following error
configure: error: Did not find pcre-config script at "/custom/location/pcre"
to solve it changing the flag --with-pcre=/custom/location/pcre to --with-pcre=/custom/location/pcre/bin/pcre2-config
BTW, on CentOS 7.6 before building httpd, please install pcre-devel
`$ sudo yum install pcre-devel`
In RHEL 3 is not necessary setting parameter --with-pcre pointing to pcre-config. Only need pcre path
My configure command:
./configure --prefix=/usr/local/apache2 --with-pcre=/usr/local/pcre
This worked for me:
sudo apt-get install libpcre3-dev
In ubuntu
This worked for me
./configure --prefix /u01/apache --with-included-apr --with-pcre=/usr/local/pcre/bin/pcre2-config