我是linux管理员的新手。我有一个运行apache的ec2实例。我已经将h5ai解压缩到正确的文件夹,但是它无法解析h5ai资源的正确url。
我得到以下404资源加载错误(chrome)
http://www.mysite.net/static/%3C?=%20APP_HREF%20?%3Eclient/css/styles.css
http://www.mysite.net/static/%3C?=%20APP_HREF%20?%3Eclient/js/scripts.js
此外,查看页面源代码,我有以下内容
<!DOCTYPE html><!--[if lt IE 10]><html class="no-js no-browser" lang="en"><![endif]--><!--[if gt IE 9]><!--><html lang="en" class="no-js browser"><!--<![endif]--><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>index · powered by h5ai 0.25.1 (http://larsjung.de/h5ai/)</title><meta name="description" content="index - powered by h5ai 0.25.1 (http://larsjung.de/h5ai/)"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="shortcut icon" href="<?= APP_HREF ?>client/images/favicon/favicon-16-32.ico"><link rel="apple-touch-icon-precomposed" type="image/png" href="<?= APP_HREF ?>client/images/favicon/favicon-152.png"><link rel="stylesheet" href="<?= APP_HREF ?>client/css/styles.css"><script src="<?= APP_HREF ?>client/js/scripts.js" data-module="main"></script></head><body><div id="topbar" class="clearfix"><ul id="navbar"></ul></div><div id="bottombar" class="clearfix"><span class="left"><span class="noJsMsg">⚡ JavaScript disabled! ⚡</span><span class="noBrowserMsg">⚡ Works best in <a href="http://browsehappy.com">modern browsers</a>! ⚡</span></span><span class="right"><a href="http://larsjung.de/h5ai/" title="h5ai 0.25.1 · a modern HTTP web server index">powered by h5ai 0.25.1</a></span><span class="center"></span></div><div id="sidebar"><div id="settings"></div></div><div id="fallback"><?= FALLBACK ?></div></body></html>
当我查看开发人员的示例页源代码时,如下所示;
<?= APP_HREF ?>
已取代应用程序位置/_h5ai/
。我知道php正在我的服务器上运行,因为wordpress和带有内容test.php的页面<?php phpinfo() ?>
工作得很好。
我对这个服务器上的文件权限(设置wordpress和FTP)有一些乐趣,这会导致我的问题吗?也就是说,服务器'apache‘对wordpress文件夹/www/html/blog
有写权限(所以我可以自动安装主题等等)。但是对于FTP (使用filezilla),用户'ec2-user‘对/www/html
的其余部分具有写权限。
任何帮助都很感激。
发布于 2014-07-09 12:39:07
如评论中所述,但为了结束这个问题。此错误很可能是由于短php标记被禁用所致。使用最近的构建解决了我的问题。
https://stackoverflow.com/questions/24467605
复制相似问题