Existing laravel 4 project gives 404 in browser

Posted by Richard A on Ask Ubuntu See other posts from Ask Ubuntu or by Richard A
Published on 2014-06-11T09:54:04Z Indexed on 2014/06/11 21:40 UTC
Read the original article Hit count: 229

Filed under:
|

I'm trying to set up a development environment on a virtual machine running Ubuntu 14.04 LTS using Nginx and HHVM. To do this, I followed the tutorial here.

This goes well with a new installation of Laravel. But when I import an existing Laravel 4 project and try to open that on my actual machine (which will serve as the client running Windows 7), I'm getting a 404 File Not Found error on the screen while connecting to http://sav.savrichard.dev. I did add this to the hosts file with the correct IP Address.

The virtual machine is receiving the request and responds with a 404 error.

How do I solve this error? I'm pretty new to Ubuntu so I'm not exactly sure what's wrong.

The project is located at

/var/www/sav.savrichard.net

The server configuration is as follow:

server {
    listen 80 default_server;

    root /var/www/sav.savrichard.net/public;
    index index.html index.htm index.php;

    server_name sav.savrichard.dev;

    access_log /var/log/nginx/localhost.sav.savrichard.dev-access.log;
    error_log  /var/log/nginx/localhost.sav.savrichard.dev-error.log error;

    charset utf-8;

    location / {
        try_files \$uri \$uri/ /index.php?\$query_string;
    }

    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt  { log_not_found off; access_log off; }

    error_page 404 /index.php;      

    include hhvm.conf;

    # Deny .htaccess file access
    location ~ /\.ht {
        deny all;
    }
}

And the hhvm.conf file is:

location ~ \.(hh|php)$ {
    fastcgi_keep_conn on;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi_params;
}

© Ask Ubuntu or respective owner

Related posts about 14.04

Related posts about nginx