Larvel issue of changing directory in a droplet

Hello I had larvel installed earlier in /var/www/HTML/ now I moved it in some other directory like /var/www/HTML/larvel/public, the larvel login is available at but when I login it gets auto redirect to not , how can I change the base project directory.



Can you share your Apache configuration and provide a bit more detail about the exact changes you made? The more information you can provide, the easier it will be to help you troubleshoot.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Sorry to see that your question hasn’t received an answer yet. Unfortunately, after this much time, it is unlikely an answer for this specific question will be provided without more information.

For people still landing here via search experiencing similar issues, the first place I would suggest to look is the the configuration for the web root in your web server. It should only point to the public/ folder, not the root of the application. For example, if your Laravel app is located at /var/www/html/laravel/ you config might look like:


server {
    listen 80;

    root /var/www/html/laravel/public;
    index index.php index.html index.htm;

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

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;

Or with Apache:

<VirtualHost *:80>
    DocumentRoot "/var/www/html/laravel/public"

    <Directory "/var/www/html/laravel/public">
        AllowOverride all

Check out this tutorial for more info on getting a Laravel app up and running: