douyue8685 2012-12-16 18:08
浏览 51
已采纳

新的锂框架安装返回错误403

I read the docs and installed lithium exactly like they have explained but I keep on getting a 403 forbidden error. I am new to apache and php and I have been spending two full days trying to make lithium work. I am running apache 2.0 on osx lion and here is what I did:

1- I created a new directory called my_app in localhost/~marwan/

2- I extracted the sample lithium app in to that directory.

3- I downloaded the lithium framework and extracted it into /libraries/lithium/

When I access http://localhost/~marwan/my_app/ I get the following 403 error:

You don't have permission to access /~marwan/mj/ on this server.

I have researched and added Options +FollowSymLinks to the .htaccess file and the error changed to:

You don't have permission to access /Users/marwan/Sites/my_app/app/webroot/webroot/ on this server.

I have tried to add Options +FollowSymLinks to every .htaccess file but nothing changed.

I dont know if this is relevant: websites on localhost/~marwan/ work but localhost also shows a 403 error. I tried to fiddle with different permissions posted in previous answers but with no luck.

Thank you for your help.

httpd.conf file is here http://pastebin.com/jLwHPbuq

Edit: httpd-userdir.conf is here http://pastebin.com/ZXi51pn7 httpd-vhosts.conf is here http://pastebin.com/3xqRmrzL

Update

The lithium project works when I remove the .htaccess from the main folder but it doesnt work properly because rewriting doesnt work. Here is the .htacces in the project root http://pastebin.com/vt0fVyyL

  • 写回答

2条回答 默认 最新

  • dtyrxmoj20617 2012-12-30 19:24
    关注

    I looked at the error log after restarting apache and found DocumentRoot [/usr/docs/dummy-host.example.com] does not exist so I fixed it by using this answer stackoverflow.com/questions/6671042/… and now it works.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R
  • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
  • ¥15 八路抢答器设计出现故障
  • ¥15 opencv 无法读取视频
  • ¥15 用matlab 实现通信仿真
  • ¥15 按键修改电子时钟,C51单片机
  • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
  • ¥20 5037端口被adb自己占了