A
A
Alexey Bely2016-11-09 20:13:19
ubuntu
Alexey Bely, 2016-11-09 20:13:19

Up-to-date installation of apache2.4 from source?

The question is simple: does anyone know a sensible manual for installing Apache2.4 from source on Ubuntu Server 14 LTS? Preferably for beginners, step by step. This is for educational purposes, that is, precisely to learn how to do it, and I will gradually grow a beard and a sweater. Install from the repository and configure LAMP + Nginx + everything else I can, it's not difficult, if according to mana and articles. But the question is about compiling for LAMP + Nginx to work.
In Google (Russian and English) there are a lot of articles, very different, but there is no complete information from and to.
So the general gist is:
I download apache, compile apr, apr-util, pcre, install apxs, specify all this stuff in configure. I also indicate the keys that, logically, will be needed during work. And I pre-install the software that may be needed before compilation: apt-get install build-essential libpcre3-dev libssl-dev gcc g++ libxml2-dev libexpat1 libexpat1-dev apache2-dev
The general configure is as follows:

./configure --prefix=/opt/apache2 -with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre/bin/pcre-config --with-apxs=/usr/bin/apxs --config-cache --enable-mpms-shared=all --enable-deflate=shared --enable-so --enable-http --with-mpm=prefork --enable-pie --enable-include=shared --enable-mime-magic=shared --enable-mime=shared--enable-rewrite=shared --enable-log-config=static --enable-logio=static --enable-cache-disk=shared --enable-cache=shared --enable-mem-cache=shared --enable-file-cache=shared --enable-cern-meta=shared --enable-dumpio=shared --enable-ext-filter=shared --enable-charset-lite=shared --enable-cgi=shared --enable-dav-lock=shared --enable-log-forensic=shared --enable-proxy=shared --enable-proxy-connect=shared --enable-proxy-ftp=shared --enable-proxy-http=shared --enable-proxy-ajp=shared --enable-proxy-balancer=shared --enable-ssl=shared --enable-authn-dbm=shared --enable-authn-anon=shared --enable-authn-dbd=shared --enable-authn-file=shared --enable-authn-default=shared --enable-authz-host=shared --enable-authz-groupfile=shared --enable-authz-user=shared --enable-authz-dbm=shared --enable-authz-owner=shared --enable-authz-default=shared --enable-auth-basic=shared --enable-auth-digest=shared --enable-dbd=shared --enable-filter=shared --enable-env=shared  --enable-expires=shared --enable-headers=shared --enable-ident=shared --enable-usertrack=shared --enable-unique-id=shared --enable-setenvif=shared --enable-version=shared --enable-status=shared --enable-autoindex=shared --enable-asis=shared --enable-info=shared --enable-cgid=shared --enable-dav=shared --enable-dav-fs=shared --enable-vhost-alias=shared --enable-negotiation=shared --enable-dir=shared --enable-imagemap=shared --enable-actions=shared --enable-speling=shared --enable-userdir=shared --enable-alias=shared --enable-substitute=shared

Pro /opt is a personal choice, so to speak. Nothing for suexec and ldap did not include.
In general, after make && make install and initial configuration (ports, etc.), for example, there is no such directory in /etc/apache2, nothing was created there.
Does anyone know why?
And this is already the fifth time that I rebuild it, but I can’t deduct anywhere why it listens only to IPv6 and completely ignores IPv4?
That is, after installation it turns out like this:
netstat -lptun | grep http
tcp6       0      0 :::80                   :::*                    LISTEN      31058/httpd

It hangs beautifully on port 80, but only IPv6!
Has anyone on Ubuntu14 built it lately, any ideas?
UPD:
1. You need to specify the port indicating the localhost: 127.0.0.1:80
2. After installing the apache2-doc package, all configs in /etc/apache2 have been created.
UPD2:
The fight was unequal, but I finished it off.
The main thing: it does not read anything from /etc until you tell it to include in the main config. Day killed to fight this mysticism.
Modules are also not connected from there, although a2enmod works.
PHP must also be connected manually to the main config, otherwise it will not work.
LoadModule php5_module  modules/libphp5.so
#AddType application/x-http-php  .php
DirectoryIndex  index.php  index.html

<IfModule mod_php5.c>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
</IfModule>

After make install, install dopsoft: apt install apache2-utils ssl-cert apache2-doc libapache2-mod-php5
Be sure to configure remoteip in the Apache and nginx configs (for joint binding).
Vhost will not work from /etc until you specify them with include in the main apache config in apache2/bin/httpd.conf. Or you can write them directly there, but it will not be very beautiful.
And how then to roll on all this good (nginx + apache + mysql + php + apc + https) Bitrix, it's just another story. Nightmare.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question