简体   繁体   English

Litespeed Port 80 (http) 打印 php 代码

[英]Litespeed Port 80 (http) printing php code

I've very new to Litespeed and so far love it!我对 Litespeed 非常陌生,到目前为止我很喜欢它! All works amazingly fast on port 443(HTTPS), but on port 80 (HTTP) the browser prints the PHP code rather than executing it.所有在端口 443(HTTPS)上运行速度惊人,但在端口 80(HTTP)上,浏览器打印 PHP 代码而不是执行它。

Can anyone point me in the right direction, I'm a bit of a noob and very new to servers.谁能指出我正确的方向,我有点菜鸟,对服务器很陌生。

This is what's running on port 80这是在端口 80 上运行的内容

root@openlitespeed-cuyg-vm:/home/info# netstat -tulpn | grep :80

tcp6       0      0 :::80     :::*       LISTEN      606/apache2

Many thanks非常感谢

summary :概括 :

the case here is LiteSpeed runs on port 443, but Apache runs on port 80 , as OP's netstat output这里的情况是 LiteSpeed 在端口 443 上运行,但 Apache 在端口 80 上运行,作为 OP 的 netstat 输出

and it seems the Apache did not configure the PHP properly , so it just outputs the source code似乎Apache没有正确配置PHP,所以它只是输出源代码

so the solution for OP was stop Apache to free port 80 , then restart LiteSpeed by systemctl restart lsws to make it bind to port 80因此 OP 的解决方案是停止 Apache 以释放端口 80 ,然后通过systemctl restart lsws以使其绑定到端口 80

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

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