Install and configure mod_rewrite for Apache 2 on Mac OS X for Zend Framework 2

前端 未结 8 914
不思量自难忘°
不思量自难忘° 2020-12-13 09:16

I getting started with zend framework 2 and they have a prerequisite of an installation and configuration of mod_rewrite for apache. Apache 2.2.22 came pre-installed on Mac

相关标签:
8条回答
  • 2020-12-13 10:04

    To check that mod_rewrite and PHP are enabled, look at /etc/apache2/httpd.conf and ensure that these lines:

    LoadModule rewrite_module libexec/apache2/mod_rewrite.so
    LoadModule php5_module        libexec/apache2/libphp5.so
    

    are uncommented.

    Also ensure that AllowOverride is set to All within the <Directory "/Library/WebServer/Documents"> section.

    After making these changes, restart Apache with: sudo apachectl restart

    If you then put your project within the /Library/WebServer/Documents folder, then it should work.

    0 讨论(0)
  • 2020-12-13 10:07

    Rob Allen's answer sounds right, but I've never used the default installation of Apache on my Mac so I can't verify. I would recommend either MAMP or Zend Server CE.

    It took me a little while to get Zend Server CE configured and running correctly on my Mac, but that was version 4 and it was buggy and either way it was well worth it. Conversely, version 5.6 of ZSCE seems to be much better!

    Some notes on Zend Server CE for Mac OS X

    If you go with MAMP, it should be a very quick install, aside from configuring virtual hosts.

    Note that both of these come with mod_rewrite already installed.

    0 讨论(0)
提交回复
热议问题