简体   繁体   English

使用PHP为Eclipse工作区配置Apache文档根

[英]Configuring Apache Document Root for Eclipse Workspaces with PHP

I've set up PHP and Apache for my Snow Leopard machine using these instructions I can change Document Root in httpd.conf such that I can run php files from different local directories. 我已按照以下说明为Snow Leopard计算机设置了PHP和Apache,可以在httpd.conf中更改文档根目录,以便可以从其他本地目录运行php文件。 However, when I set it to the the location of my Eclipse workspace, I get "Forbidden - You don't have permission to access / on this server" 但是,当我将其设置为Eclipse工作区的位置时,会显示“禁止-您无权访问此服务器上的/”

I'd like to be able to use the Eclipse New PHP Project to "Create a new project in workspace" instead of creating a directory somewhere else and using "Create project at existing location..." 我希望能够使用Eclipse New PHP Project来“在工作区中创建新项目”,而不是在其他位置创建目录并使用“在现有位置创建项目...”

What am I missing? 我想念什么?

You need to modify corresponding <Directory path> directive. 您需要修改相应的<Directory path>指令。 You already have this directive for previous DocumentRoot, so just change path in there to your current document root. 您先前的DocumentRoot已有此指令,因此只需在其中更改当前文档根目录的路径即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM