ssl Whisper OpenAI的Apache服务器配置

kzipqqlq  于 2023-03-23  发布在  Apache
关注(0)|答案(1)|浏览(239)

下午好,我已经在Linux服务器上安装了OpenAI的Whisper,Ubuntu和Apache作为Web服务器。我README.md使用Python在https://huggingface.co/spaces/aadnk/whisper-webui中托管的www.example.com文件中遵循了教程。
当我通过没有SSL的HTTP访问http://whisper.mydomain.com:7860/时,它工作得很好。

但是,当我通过HTTPS使用SSL访问https://whisper.mydomain.com/时,将流量重定向到Apache的7860端口,Web界面加载,但是当我上传相同的文件来转录音频时,它一直加载,从不显示结果。

下面是我的Apache配置:

<VirtualHost *:80>
ServerName whisper.mydomain.com
Redirect / https://whisper.mydomain.com/
</VirtualHost>

<VirtualHost *:443>
ServerName whisper.mydomain.com
ProxyPass / http://whisper.mydomain.com:7860/
ProxyPassReverse / http://whisper.mydomain.com:7860/

SSLEngine on
SSLCertificateFile "/etc/ssl/certs/AlphaSSL__.mydomain.com.pem"
SSLCertificateKeyFile "/etc/ssl/private/AlphaSSL__.mydomain.com.key"
</VirtualHost>

有什么想法我可以做什么,使它正常工作?谢谢。

cngwdvgl

cngwdvgl1#

早上好,我通过卸载Apache并使用Nginx解决了我的问题,配置文件如下:

server {
listen 80;
server_name whisper.mydomain.com;
return 301 https://whisper.mydomain.com/;
}

server {
listen 443 ssl;
server_name whisper.mydomain.com;

ssl_certificate "/etc/ssl/certs/AlphaSSL__.mydomain.com.pem";
ssl_certificate_key "/etc/ssl/private/AlphaSSL__.mydomain.com.key";

location / {
    proxy_pass http://whisper.mydomain.com:7860;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
    proxy_redirect off;
    proxy_http_version 1.1;
    proxy_set_header Connection "upgrade";
    proxy_read_timeout 86400;
}

}

相关问题