[README.md]: update
This commit is contained in:
parent
f6b39a2b4c
commit
de432a4b83
62
HACKING.md
62
HACKING.md
@ -147,48 +147,56 @@ LoadModule wsgi_module modules/mod_wsgi.so
|
|||||||
|
|
||||||
- Create vhosts, for example:
|
- 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:
|
and inside write the configuration, example:
|
||||||
|
|
||||||
<IfModule ssl_module>
|
```apacheconf
|
||||||
<VirtualHost *:80>
|
<IfModule ssl_module>
|
||||||
ServerAdmin example@dominio.com
|
<VirtualHost *:80>
|
||||||
ServerName example.com
|
ServerAdmin example@dominio.com
|
||||||
ServerAlias example.com
|
ServerName example.com
|
||||||
|
ServerAlias example.com
|
||||||
|
|
||||||
Alias /media /path/to/site/media/
|
Alias /media /path/to/site/media/
|
||||||
Alias /static /path/to/site/core/static/
|
Alias /static /path/to/site/core/static/
|
||||||
<Directory /path/to/site/core/static>
|
<Directory /path/to/site/core/static>
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /path/to/site/media>
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /path/to/site/personalsite>
|
||||||
|
<Files wsgi.py>
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Files>
|
||||||
|
</Directory>
|
||||||
|
|
||||||
<Directory /path/to/site/media>
|
WSGIDaemonProcess personalsite python-home=/path/to/site/venv python-path=/path/to/site
|
||||||
Require all granted
|
WSGIProcessGroup personalsite
|
||||||
</Directory>
|
WSGIScriptAlias / /path/to/site/wsgi.py
|
||||||
|
|
||||||
<Directory /path/to/site/personalsite>
|
</VirtualHost>
|
||||||
<Files wsgi.py>
|
</IfModule>
|
||||||
Require all granted
|
```
|
||||||
</Files>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
WSGIDaemonProcess personalsite python-home=/path/to/site/venv python-path=/path/to/site
|
|
||||||
WSGIProcessGroup personalsite
|
|
||||||
WSGIScriptAlias / /path/to/site/wsgi.py
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
- Replace `ALLOWED_HOSTS = []`
|
- Replace `ALLOWED_HOSTS = []`
|
||||||
|
|
||||||
on setting.py to:
|
on setting.py to:
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["example.com", "localhost"]
|
```python
|
||||||
|
ALLOWED_HOSTS = ["example.com", "localhost"]
|
||||||
|
```
|
||||||
|
|
||||||
- Added on setting.py:
|
- 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).
|
- Generated files static of Admin Django (you must be inside the virtualenv).
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user