From de432a4b835cf116f3fa5ab07dbfd9f1ef044d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Sun, 30 May 2021 18:20:43 -0500 Subject: [PATCH] [README.md]: update --- HACKING.md | 62 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/HACKING.md b/HACKING.md index 465a8d4..ae87784 100644 --- a/HACKING.md +++ b/HACKING.md @@ -147,48 +147,56 @@ LoadModule wsgi_module modules/mod_wsgi.so - Create vhosts, for example: - $ sudo nano -w /etc/httpd/conf/extra/httpd-vhosts.conf +```console +$ sudo nano -w /etc/httpd/conf/extra/httpd-vhosts.conf +``` and inside write the configuration, example: - - - ServerAdmin example@dominio.com - ServerName example.com - ServerAlias example.com +```apacheconf + + + ServerAdmin example@dominio.com + ServerName example.com + ServerAlias example.com - Alias /media /path/to/site/media/ - Alias /static /path/to/site/core/static/ - + Alias /media /path/to/site/media/ + Alias /static /path/to/site/core/static/ + + Require all granted + + + + Require all granted + + + + Require all granted - + + - - Require all granted - + WSGIDaemonProcess personalsite python-home=/path/to/site/venv python-path=/path/to/site + WSGIProcessGroup personalsite + WSGIScriptAlias / /path/to/site/wsgi.py - - - Require all granted - - - - WSGIDaemonProcess personalsite python-home=/path/to/site/venv python-path=/path/to/site - WSGIProcessGroup personalsite - WSGIScriptAlias / /path/to/site/wsgi.py - - - + + +``` - Replace `ALLOWED_HOSTS = []` on setting.py to: - ALLOWED_HOSTS = ["example.com", "localhost"] +```python +ALLOWED_HOSTS = ["example.com", "localhost"] +``` - Added on setting.py: - STATIC_ROOT = '/path/to/site/core/static' +```python +STATIC_ROOT = '/path/to/site/core/static' +``` - Generated files static of Admin Django (you must be inside the virtualenv).