나는 ZendSkeletonApplication을 사용하여 웹 응용 프로그램을 개발하기 위해 쿠분투에 Apache/PHP/MySQL이있는 로컬 웹 서버를 설치했습니다. 문서 루트 ZSA의 공용 폴더로 설정됩니다젠드 프레임 워크 2에서 커스텀 모듈을 사용하려면?
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
http://localhost
요청이 제대로 index.php
을 검색하십시오 ZSA의 공용 폴더 내
<VirtualHost *>
ServerName localhost
ServerAdmin [email protected]
DocumentRoot "/var/www/ZendSkeletonApplication/public"
<Directory /var/www/ZendSkeletonApplication/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
은 htaccess로 파일을 읽고 있습니다. 또한 mod_rewrite가 작동 중입니다. 마지막 줄을
RewriteRule ^.*$ test.php [NC,L]
으로 바꿔서 테스트 해 봅니다.
다음으로 아키텍처에 익숙해지기 위해 간단한 "Hello World"모듈을 작성했습니다. 사실, 나는 다른 튜토리얼을 따라 두 개의 모듈을 썼다. 내가 http://localhost/helloworld
를 요청하려고 할 때마다하지만 404 오류 나는 ZF2에서 경로를 두 번 확인
The requested URL /helloworld was not found on this server.
를 얻을.
이 시점에서 나는 붙어 있습니다. 저는 무역으로 PHP 개발자이며 서버 관리에 대한 지식이별로 없기 때문에 설치가 잘못 될 가능성이 가장 큽니다.
내가 잘못했을지도 모르는 방향을 묻고 싶습니다. 내가 확인할 수있는 어떤 함정이 당신의 마음에오고 있습니까? 제공해야 할 정보가 있습니까?