简体   繁体   English

WebVirtMgr NGINX-> Apache2配置

[英]WebVirtMgr NGINX -> Apache2 configuration

will anyone help me with transferring configuration from Nginx to Apache2? 有人可以帮助我将配置从Nginx传输到Apache2吗? I dont know what to do with headers editing... 我不知道如何处理标题编辑...

Thanks 谢谢

According this: 据此:

https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

server {
    listen 80 default_server;

    server_name $hostname;
    #access_log /var/log/nginx/webvirtmgr_access_log; 

    location /static/ {
        root /var/www/webvirtmgr/webvirtmgr; # or /srv instead of /var
        expires max;
    }

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Forwarded-Proto $remote_addr;
        proxy_connect_timeout 600;
        proxy_read_timeout 600;
        proxy_send_timeout 600;
        client_max_body_size 1024M; # Set higher depending on your needs 
    }
}

Found solution! 找到解决方案! Just make you sure, that you have libapache2-mod-wsgi installed 只要确保您已安装libapache2-mod-wsgi

WSGISocketPrefix /var/run/apache2/wsgi
<VirtualHost *:8080>
    ServerAdmin webmaster@dummy-host.example.com
    ServerName meinserver.xx

    WSGIDaemonProcess webvirtmgr display-name=%{GROUP} python-path=/var/www/webvirtmgr
    WSGIProcessGroup webvirtmgr
    WSGIScriptAlias / /var/www/webvirtmgr/webvirtmgr/wsgi.py

    Alias /static /var/www/webvirtmgr/webvirtmgr/static/
    Alias /media /var/www/webvirtmgr/webvirtmgr/media/

    <Directory /var/www/webvirtmgr/webvirtmgr>
        <Files wsgi.py>
            Order deny,allow
            Allow from all
        </Files>
    </Directory>

    CustomLog ${APACHE_LOG_DIR}/webvirtmgr-access_log common
    ErrorLog ${APACHE_LOG_DIR}/webvirtmgr-error_log
</VirtualHost>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM