开发者

apache setup shows directory files instead of the website

开发者 https://www.devze.com 2023-02-14 14:46 出处:网络
I just finished setting up a local site for development wit开发者_如何学Pythonh apache2 on OSX, but what happens is that when i go to my site (cakephp with htaccess and index.php) i get simply a list

I just finished setting up a local site for development wit开发者_如何学Pythonh apache2 on OSX, but what happens is that when i go to my site (cakephp with htaccess and index.php) i get simply a list of the files and folders that i can click, instead of the actual website.

I tried to put an index.html and the index page loads right. But when i remove it, i get a list of files in the directory.

Any help?


I was missing the line:

WSGIScriptAlias / /path/to/mysite/apache/django.wsgi


I think you have to add type for php files in httpd.conf file:

AddType application/x-httpd-php .php 

Remember to restart apache after this. Can you post your .htaccess file?

Additionally, you could simply download and install MAMP on your Mac. It's a pack with Apache+PHP+MySql. You can find it here: http://www.mamp.info/en/index.html but remember to uninstall apache that you already installed (to avoid conflicts).

0

精彩评论

暂无评论...
验证码 换一张
取 消