0

I have deployed a PHP website do an OpenShift PHP 5.4 Cartridge. The application loads just fine, CSS, JS, etc. but images do not load correctly. The images exist in the git repo which is being pushed to OpenShift just fine but when I attempt to access an image, say from http://someopenshiftapp/images/logo.jpg it fails with a 500 error.

The server log gives me: /app-root/runtime/repo/images/.htaccess: Invalid command 'IndexIgnore', perhaps misspelled or defined by a module not included in the server configuration

I am trying to resolve this issue but so far google has not been able to help me. I tried editing the httpd.conf to include the module but that is a read only file. I may have to create a new cartridge from scratch? How do I serve images with OpenShift?

4

1 回答 1

0

我不知道 Apache 这样做的确切原因,但确实如此。有一个 robots.txt 文件不允许其他开发人员添加的图像目录中的所有用户代理。这导致 Apache 安装在尝试访问 images 子目录中的资源时给出 500 错误。如果有人有任何进一步的解释,我愿意听,但现在这个谜团已经解开了。

我可能会在与 OpenShift 无关的独立 Apache 环境中测试这个确切的情况,并尝试重现这个错误。:) 快乐编码。

于 2015-06-13T21:59:17.773 回答