共享主机上的 zend 项目?
我在 ubuntu 操作系统上的 localhost 上创建了一个 zend 项目,它在我的本地系统上完美运行。现在我想把这个项目上传到网上。我购买了域名和托管。我得到以下目录结构来上传文件。
/www.example.com/web/content/
因此 www.example.com 指向 /www.example.com/web/content/
文件夹。该目录结构是不可更改的。我将所有 public 文件夹文件放入 /www.example.com/web/content/
和 application、library和 tests 文件夹放入 /www.example.com/web/
。所以它与我的本地系统是同一目录,但只有公共文件夹被重命名为内容文件夹。
现在主页已成功显示,但每当我单击任何链接或重定向到任何其他网页时,都会出现以下错误。
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2 Server at example.com Port 80
有什么想法吗?
谢谢
I created a zend project on localhost on ubuntu OS and it is working perfectly on my local system. Now I want to upload this project online. I purchased domain name and hosting. I got following directory structure to upload files.
/www.example.com/web/content/
So www.example.com is pointing to /www.example.com/web/content/
folder. This directory structure is unchangeable. I put all public folder files to /www.example.com/web/content/
and application, library and tests folders into /www.example.com/web/
. So it is the same directory as my local system but only public folder is renamed to content folder.
Now homepage is successfully shown but whenver I click any link or redirect to any other webpage, I got following error.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2 Server at example.com Port 80
Any idea ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
发生内部服务器 (HTTP 500) 错误的原因有很多。您应该检查网络服务器的错误日志以获取更多详细信息。如果您无权访问虚拟主机的错误日志,请要求您的主机查看出了什么问题。
Internal server (HTTP 500) errors can occur for many reasons. You should check your web server's error log for more details. If you don't have access to your vhosts' error log, ask your host to see what's going wrong.
阅读以下线程后解决了这个问题:
http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/problems-1and1-hosting-560.html
所以它正在使用以下.htaccess:
It is solved after reading following thread:
http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/problems-1and1-hosting-560.html
So it is working using following .htaccess: