简体   繁体   English

如何在同一个 apache 网络服务器上运行 mod-mono 和 php

[英]Howto run mod-mono and php on same apache webserver

I've successfully implemented mod-mono and apache webserver on a Centos 8 distro.我已经在 Centos 8 发行版上成功实现了 mod-mono 和 apache 网络服务器。 I've also installed PHP 7.2 on the server and the configuration looks ok on eye inspection.我还在服务器上安装了 PHP 7.2,配置看起来没问题。 However, the webserver is not executing the PHP files, but serving them for download.但是,网络服务器并没有执行 PHP 文件,而是为它们提供下载服务。

If i go to http://example.com - it runs the website in MONO space If I go to http://example.com/info.php - it gives me the PHP file for downloading.如果我访问http://example.com - 它在单声道空间中运行网站 如果我访问http://example.com/info.php - 它为我提供了 PHP 文件以供下载。 It makes me think that it tries to run the php file through mono and fails, so gives it to me for download instead forwarding it to PHP for execution.这让我觉得它试图通过单声道运行 php 文件并失败,所以把它给我下载而不是将它转发给 PHP 执行。

Is it possible to run both PHP and MONO code on same apache webserver?是否可以在同一个 apache 网络服务器上同时运行 PHP 和 MONO 代码? If yes, what could be the tricks to have it working ?如果是的话,让它工作的技巧是什么?

Many thanks.非常感谢。

Actually having a separate PHP website and also MONO websites in same apache server was working.实际上在同一个 apache 服务器中有一个单独的 PHP 网站和 MONO 网站正在工作。 However I though things were not working since I tried to run the PHP file from within the MONO-handled virtualhost ... so no need for clarifications.但是,我虽然尝试从 MONO 处理的虚拟主机中运行 PHP 文件,但事情并没有奏效……所以不需要澄清。

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

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