0

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;
}

}

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

I also noticed recently that now my site works and shows the laravel landing page but now i cannot access my other parts of my site which is located in www/html.. Is there any way to solve this?
or can i prehaps move my website which i still want into the public inside the laravel folder? how would i go about with this ?
Moving the html website into the public folder will most likely lead to problems, if you are only access your sites via IP, you could listen on multiple ports httpd.apache.org/docs/2.2/vhosts/examples.html#port
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.