gpt4 book ai didi

linux - WebVirtMgr NGINX -> Apache2 配置

转载 作者:太空宇宙 更新时间:2023-11-04 03:34:43 24 4
gpt4 key购买 nike

有人能帮我将配置从 Nginx 转移到 Apache2 吗?我不知道如何编辑标题...

谢谢

根据此:

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
}
}

最佳答案

找到解决办法了!只需确保您已安装 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>

关于linux - WebVirtMgr NGINX -> Apache2 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32009181/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com