Apache:
Option 1:
-- sudo apt-get install apache2 apache2-doc apache2-utils
Option 2: latest one from the source code
Steps:
Apache Tar file :
-- wget http://www.apache.org/dist/httpd/httpd-2.4.20.tar.gz
Dependancy tar files:
-- wget http://www.apache.org/dist/apr/apr-1.5.2.tar.gz
-- wget http://www.apache.org/dist/apr/apr-util-1.5.4.tar.gz
-- wget http://www.apache.org/dist/apr/apr-iconv-1.2.1.tar.gz
Before apache installation:
-- sudo apt-get install libtool autoconf gcc g++ libpcre3 libpcre3-dev
Unzip the apache tar files:
-- tar -xvf httpd-2.4.20.tar.gz
-- cd httpd-2.4.20/
-- Untar the "apr"(apr-1.5.2.tar.gz, apr-util-1.5.4.tar.gz and apr-iconv-1.2.1.tar.gz) files
-- put it on httpd-2.4.20/srclib/ without version info
installing apache2 on /usr/local/apache2:
-- ./configure --prefix=/usr/local/apache2
-- make
-- make install
-- Add "ServerName localhost" at conf/http.conf file
-- Change the listen port as whatever you want
mod_wsgi:
-- Apache Requirements
--Apache 2.0, 2.2 or 2.4
-- wget https://github.com/GrahamDumpleton/mod_wsgi/archive/4.5.3.tar.gz
-- tar -xvf 4.5.3.tar.gz
-- ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/bin/python
-- make
-- make install
Configuração do Apache:
1) Crie um ambiente virtual
2) aponte para arquivos vhost
3) incluir o arquivo vhost no arquivo httpd.conf
exemplo:
- cd / usr / local / apache2 / conf /
- sudo vim httpd.conf
- adicione o local do seu arquivo vhost no final do arquivo
Minha configuração é assim: "include /home/kanagaraj/PycharmProjects/hyso_exchange/apacheconf/vhost.conf"
4) collectstatic (python manage.py collectstatice)
5) arquivo statice Pointout no arquivo vhost
6) digite assim no seu navegador: link
Nota:
exemplo para arquivos vhost vhost_local.conf, vhost_stating.conf