I am setting up a Zend application (ZF2) in ubuntu 13.10. Following the instructions below:
- Enter the code
/var/www/ with the name zfapp
Virtual host configuration:
<VirtualHost *:80> ServerName zfapp.com DocumentRoot /var/www/zfapp/ <Directory /> Options FollowSymLinks AllowOverride All </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined </VirtualHost>
Creating a virtual host for it in /etc/hosts
127.0.0.1 zfapp.com
Add file to /etc/apache2/sites-available/zfapp.cof
sudo a2enmod rewrite
sudo a2ensite zfapp.conf
sudo service apache2 restart
However, when I browse the site ( zfapp.com/api/user/auth ); It gives the following error:
Not Found Requested Url /api/user/auth not found on this server
I have an MVC javascript project in which I use PHP as a server language.
Here is the structure of the project directory:
ProjectDir javascriptMVC folder-> jsfiles models / controllers api folder → Zend project
I made an api symbolic link that points to api/public inside the javascriptMVC directory that I use in AJAX calls on a PHP server. like /api/user/auth . The same structure works on an old Ubuntu machine.
I think this has something to do with Apache configuration; or maybe i need to set any alias?
php ubuntu apache virtualhost zend-framework2
Abdul raauf
source share