Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have created a project zfapi by zf command in ubuntu.

Now http://mysite.com/path/to/zfapi/

gives me listing of folder public application and others.

http://mysite.com/path/to/zfapi/public give me the index page index.php.

and i have made the UserController.php in application/controllers

but by http://mysite.com/path/to/zfapi/user/

is saying user not found.

what configuration i need to set for running it proper.

I had set my /etc/apache2/apache2.conf added the following in the last .

<VirtualHost *:80>

    DocumentRoot "/var/www/path/to/zfapi"

    <Directory "/var/www/path/to/zfapi">

        Order allow,deny

        Allow from all

    AllowOverride all

</Directory>

</VirtualHost>

is giving me this error while restarting server.

[Sat Jan 08 13:32:53 2011] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Sat Jan 08 13:33:03 2011] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results

what this i should do .?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

You should at least set a ServerName when using virtualhost configuration.

<VirtualHost *:80>
    ServerName mydomain.com
    DocumentRoot "/var/www/path/to/zfapi"
    <Directory "/var/www/path/to/zfapi">
        Order allow,deny
        Allow from all
    AllowOverride all
</Directory>
</VirtualHost>

And you will have to check that you install mod rewrite by doing this:

sudo a2enmod rewrite

And it wasn't enabled restart apache.

share|improve this answer
    
I have one site-enabled , so i prefer nothing should happen to that site , and i don't have other domain name ,than what ServerName I can give here ,and In which file I need to write this VirtualHost Tag? –  Rahul Mehta Jan 8 '11 at 11:25

check your apache configuration files for the 'NameVirtualHost' string

sudo grep -iR NameVirtualHost /etc/apache2/*

It's quite certainly something different than

NameVirtualHost *:80

Maybe you have

NameVirtualHost *

or

NameVirtualHost 10.1.1.15:80

Your VirtualHost tag, the first tag of your VirtualHost definition must match this definiion. You an hae several differentNameVirtualHost defintions, this is elling apache what configuration of listening IP address/port should be attached to VH definitions. If your VH definition does not match any of these you've got the error log you have.

so maybe you'll need on your VH:

<VirtualHost *>

http://httpd.apache.org/docs/2.0/mod/core.html#namevirtualhost

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.