Hi!
I’m trying to port an conf file from Nginx to Apache. Right now I’m running an python application with Nginx and Gunicorn, but I would like to use Apache instead of Nginx.
server_names_hash_bucket_size 64;
upstream frappe {
server 127.0.0.1:8000 fail_timeout=0;
}
server {
listen 80 default ;
client_max_body_size 4G;
server_name frappe_default_site;
keepalive_timeout 5;
sendfile on;
root /home/ubuntu/frappe-bench/sites;
location /private/ {
internal;
try_files /$uri =424;
}
location /assets {
try_files $uri =404;
}
location / {
try_files /erpnext/public/$uri @magic;
}
location @magic {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Frappe-Site-Name erpnext;
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;
}
}
And this is what I have:
<VirtualHost *:80>
ServerName local.co
ServerAlias www.local.co
DocumentRoot "/home/ubuntu/frappe-bench/sites/"
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
</VirtualHost>
<VirtualHost *:443>
ServerName local.co
ServerAlias www.local.co
DocumentRoot "/home/ubuntu/frappe-bench/sites"
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
</VirtualHost>
Can anyone help me? Thanks a lot.