blainarmstrong
blainarmstrong

Reputation: 1010

Zend Framework under Ubuntu 11.10: internal server error with virtual server

I'm having a strange problem with Zend Framework under Ubuntu 11.10. I'm using a laptop as my programming environment to test out some things before uploading them to my main server. I downloaded and installed Zend Framework and created a new project. When going to localhost.project, everything works just fine.

The problem is when I then try to set up a virtual server so I can go to project.localhost and see it the same way (I know it's not vital to be able to do so, but I want to anyway). I set up a virtual host by going to /etc/apache2/sites-available and creating a new virtual host in there. If I set documentRoot and whatnot to /var/www/project/public, I get an internal server error. What's stranger still is that, if I then set it to just /var/www/project, I can see all the directories--application, docs, library, tests--but NO public. I have no idea why this is happening.

I am using a fresh install of Ubuntu 11.10, and I used tasksel to install the LAMP server. This should be working--it worked fine with my VPS--but it is not.

Edit: here's the file for the virtual host:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName project.localhost

DocumentRoot /home/moi/web_docs/project/public
<Directory />
    Options All
    AllowOverride All
</Directory>
<Directory /home/moi/web_docs/project/public>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all

Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Upvotes: 2

Views: 1717

Answers (1)

dbrumann
dbrumann

Reputation: 17166

You have to enable Apache's rewrite-module:

sudo a2enmod rewrite
sudo service apache2 restart

Upvotes: 5

Related Questions