我尝试在Windows10上用不同的端口在不同的虚拟主机上托管两个不同的应用程序。问题是,从一个应用程序到另一个应用程序的请求很少,apache就完全挂起了。你知道吗
将它们托管在一个具有不同路径的虚拟主机上似乎可以解决问题,禁用请求也是如此。你知道吗
这两个应用程序都是Python和web服务器。你知道吗
Listen 80
Listen 3000
ServerName localhost
<VirtualHost *:80>
WSGIScriptAlias / F:\path\to\server.wsgi
<Directory F:\path\to>
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:3000>
WSGIScriptAlias / F:\another\path\to\server.wsgi
<Directory F:\another\path\to>
Require all granted
</Directory>
</VirtualHost>
AcceptFilter http none
AcceptFilter https none
看来我找到了解决办法:
如果您在应用程序中使用C模块,请在VirtualHost中添加这一行
Slow page loading on apache when using Flask
https://modwsgi.readthedocs.io/en/develop/user-guides/application-issues.html#python-simplified-gil-state-api
相关问题 更多 >
编程相关推荐