User
User

Reputation: 1488

Creating your first laravel project on web server

ive recently just follwed this guide and "installed" laravel on my lamp server: https://www.digitalocean.com/community/tutorials/how-to-install-laravel-with-an-nginx-web-server-on-ubuntu-14-04

Now when im finished it says at the bottom of their guide

"You now have Laravel completely installed and ready to go. You can see the default landing page by visiting your server's domain or IP address in your web browser:

http://server_domain_or_IP"

When i visit my website there is no new landing page and there is no new files in the var/www/html that would act as a landing page except for the standard apache one.

For me this is fine but i still dont know how to create my first project, i want to do this to check my install is finished and i am ready for bed.

Here is how my www directory looks like at the moment:

enter image description here

And here is my nginx config which i believe plays a part in this whole thing:

server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;
    root /var/www/laravel/public;
    index index.php index.html index.htm;

    server_name www.mysite.me;

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

    location ~ \.php$ {
    try_files $uri /index.php =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
}

}

Upvotes: 0

Views: 722

Answers (2)

andyd_28
andyd_28

Reputation: 161

The files are in the /var/www/laravel folder rather than the /var/www/html folder which is visible in the screenshot you provided.

From my own experience when this happens, it is due to having multiple 'default server' attributes in multiple nginx config files for different websites so when looking at the server via the IP it is not selecting your new laravel build.

Upvotes: 1

User
User

Reputation: 1488

The server needs to restart for some of the settings to take place.

You can try accessing its console and type

To reboot a server from the command line, run:

sudo shutdown -r now

To restart Apache, run:

 sudo service apache2 restart

Upvotes: 0

Related Questions