Friday, May 3, 2013

Apache in a Nut Shell

httpd -l lists the static libraries

You may have to edit configure script to resolve an error while installing apache.

I have been getting an error because I am trying to install mod_ssl
I am  running configure script and getting  an error that shows the line number .
You must try to understand the error messages  and see what is wrong.

Before installing apache make sure you have correct value of path variable. Installation will report error if something is wrong.
Edit your values ,properly.
Path variable needs to have proper kernel bin paths especially C compiler path.
What are you using CC or Gcc ?



If you are trying to reinstall apache then don't forget to clean the previous apache install using the  make clean command .

sudo ./configure --prefix=/apps/apache_xyz --enable-mods-shared='cern-meta deflate disk-cache headers info mem-cache mime-magic isapi proxy rewrite speling unique-id usertrack vhost-alias' --enable-modules=mod-ssl --with-ssl=/usr/local/bin/openssl
sudo make clean
sudo make install

sudo ./configure --prefix=/apps/apache_xyz --enable-cern-meta --enable-cache --enable-disk-cache --enable-mem-cache --enable-cern-meta --enable-deflate --enable-expires --enable-headers --enable-info --enable-logio --enable-mime-magic --enable-rewrite --enable-so --enable-speling --enable-ssl --enable-unique-id --enable-usertrack --enable-vhost-alias --with-ssl=/usr/local
sudo make clean
sudo make install

What is the difference in the above two commands?
First command is trying to install  shared libraries  ( dynamic libraries) 
There will be lines like LoadModule in the httpd.conf file for first installation.
Second command is trying to install libraries via static compiling .
You will not see  LoadModule sentences in the httpd.conf file for second installation
You can use the command  httpd -l for the second installation to list all statically compiled modules

There is also one more difference
first command is installing proxy and isapi modules
but the second command is not trying to install proxy and isapi modules.

Its better to install apache once again rather than adding a new module if you have a missing module.

You can't just copy and paste apache binaries ,they are dependent on your directory structure .


The two imporant files that store the configuration of apache are
httpd.conf  and ssl.conf  files.


How to get rid of passphrase while starting apache?

What do you get when you try to access a URL with http but at port 443?


E.g http://url:443




No comments: