0

I am using Vagrant to set up my local development environment. I managed to do port forwarding from port 80 on my Virtual Machine (lucid64) to my host port 8080. If I put an index.html file in my project folder and type 'localhost:8080' in my browser, I see the html page displayed. So far so good.

The thing is I work on a framework which has this directory structure:

app
**public**
vendor
tmp

where the public folder should be the 'root' folder.

So I edited the project.conf file located at /etc/apache2/sites-available in my Virtual Machine to:

<VirtualHost *:80>
    DocumentRoot /vagrant/public
</VirtualHost>

(I simply added the '/public' part).

Now when I go to localhost:8080 in my browser, it downloads the index.php file in the public folder instead of displaying it. How can I fix that please?

4

1 回答 1

1

PHP 是否在您的 apache 配置中正确安装和启用?我不认为这与流浪汉有关。

于 2012-09-19T16:13:50.510 回答