By letstalk
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 http://example.com/larvel/public but when I login it gets auto redirect to http://example.com/do-login not http://example.com/larvel/do-login , how can I change the base project directory.
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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:
Nginx:
server {
listen 80;
server_name example.com;
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>
ServerName example.com
DocumentRoot "/var/www/html/laravel/public"
<Directory "/var/www/html/laravel/public">
AllowOverride all
</Directory>
</VirtualHost>
Check out this tutorial for more info on getting a Laravel app up and running:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.