Answer the question
In order to leave comments, you need to log in
Difficulty in understanding Apache after using NGINX, how to simplify?
I have a Django project in docker
Build NGINX/POSTGRESS/GUNICORN
And I usually use nginx config which looks like this and basically forwards all connections to port 8000
server {
client_max_body_size 100M;
listen 443 ssl;
listen [::]:443 ssl;
#ssl_certificate_key /etc/nginx/conf.d/nginx-selfsigned.key;
#ssl_certificate /etc/nginx/conf.d/nginx-selfsigned.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem;
server_tokens off;
location /static/ {
autoindex off;
alias /static/;
}
location /media/ {
autoindex on;
alias /media/;
}
location /admin {
try_files $uri $uri/ @python_django;
}
location / {
try_files $uri $uri/ @python_django;
}
location @python_django {
proxy_pass http://python:8000;
proxy_pass_request_headers on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
}
}
Alias /static /home/8host/myproject/static
<Directory /home/8host/myproject/static>
Require all granted
</Directory>
<Directory /home/8host/myproject/myproject>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess myproject python-home=/home/8host/myproject/myprojectenv python-path=/home/8host/myproject
WSGIProcessGroup myproject
WSGIScriptAlias / /home/8host/myproject/myproject/wsgi.py
Answer the question
In order to leave comments, you need to log in
I don’t know about ionic, but for angular there is a good carousel https://github.com/devmark/angular-slick-carousel
It is better to throw out Apache from this sheaf. it is much slower and less secure than Nginx.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question