Apache 无法使用R进行brew
brew的httpd.conf文件配置如下:Apache 无法使用R进行brew,apache,r,rapache,Apache,R,Rapache,brew的httpd.conf文件配置如下: <Directory /usr/local/apache2/htdocs/brew> SetHandler r-script RHandler brew::brew DefaultType text/html </Directory> 我的apache主目录是/usr/local/apache2/htdocs,但是在 img src=“” 它将其视为/usr/local/apa
<Directory /usr/local/apache2/htdocs/brew>
SetHandler r-script
RHandler brew::brew
DefaultType text/html
</Directory>
我的apache主目录是/usr/local/apache2/htdocs,但是在
img src=“”
它将其视为/usr/local/apache2/htdocs/filename.png,apache不知道这是什么。有什么想法吗?您需要安装RApache:
RApache是一个带有R的Apache模块,用于在服务器上解释brew代码并呈现正确的html页面。本地文件名及其完整名称仅为服务器所知(Apache): 对于客户端(您的web浏览器),您需要URL或相对路径。 特别是,
/usr/local/apache2/htdocs
前缀不应再存在
试着替换
<img src="<%=filename%>"/>
<img src="<%=gsub('/usr/local/apache2/htdocs', '', filename)%>"/>
“/>
与
“/>
<%=filename%>
/usr/local/apache2/htdocs/file199c5ea9644c.png
<img src="<%=filename%>"/>
<img src="<%=gsub('/usr/local/apache2/htdocs', '', filename)%>"/>