Hi everyone, i got problem with frappe in production environment. I did:
bench setup supervisor
bench setup redis
bench setup socketio
bench setup nginx
sudo supervisorctl start all
REDIS_CONF="/workspace/development/frappe-bench/config/redis_queue.conf"
sed -i 's/^port 6379/port 13000/' $REDIS_CONF
REDIS_CACHE_CONF="/workspace/development/frappe-bench/config/redis_cache.conf"
sed -i 's/^port 6379/port 11000/' $REDIS_CACHE_CONF
sudo supervisorctl restart frappe-bench-redis:
sudo supervisorctl status
All service is running but can’t route frappe with mysite.localhost:80
This is nginx config:
server {
listen 80;
listen [::]:80;
server_name
mysite.localhost
;
root /workspace/development/frappe-bench/sites;
location / {
rewrite ^(.+)/$ $1 permanent;
rewrite ^(.+)/index\.html$ $1 permanent;
rewrite ^(.+)\.html$ $1 permanent;
location ~* ^/files/.*.(htm|html|svg|xml) {
add_header Content-disposition "attachment";
try_files /mysite.localhost/public/$uri @webserver;
}
try_files /mysite.localhost/public/$uri @webserver;
}
location @webserver {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frappe-Site-Name mysite.localhost;
proxy_set_header Host $host;
proxy_set_header X-Use-X-Accel-Redirect True;
proxy_read_timeout 120;
proxy_redirect off;
proxy_pass http://frappe-bench-frappe;
}