Need help deploying my Laravel application

Z4Teen

New member
Joined
Feb 27, 2024
Messages
2
Hello. Im a student new to web hosting and wondering if anyone can help me to host my website using the directadmin control panel because i literally have no idea whats going on and how to do anything. i tried watching some tutorial but even after uploading my files when i typed in my domain name this page appear.

This Site Is Under Construction and Coming Soon.

This site is currently under construction. Please check back at a later time.


Hope anyone could help. i have next to zero knowledge in web hosting. thanks
 

Attachments

  • image_2024-02-27_221442674.png
    image_2024-02-27_221442674.png
    40.9 KB · Views: 134
Hi,

Laravel expects a different folder structure than the one that DirectAdmin creates.
In DirectAdmin delete the "public_html" folder and then create a symbolic link from "laravel/public" to "public_html".
--
Wil
 
Hi,

Laravel expects a different folder structure than the one that DirectAdmin creates.
In DirectAdmin delete the "public_html" folder and then create a symbolic link from "laravel/public" to "public_html".
--
Wil
Hello Wil. Thanks for replying.

What is this symbolic link and how do i create it?
 
Hello Wil. Thanks for replying.

What is this symbolic link, and how do I create it?
This feature is called symlink


Laravel framework uses another directory for the public path is a public directory another directories from project cannot be public inside the public_html directory
 
Yes, the problem here is that this falls outside of DirectAdmin and that you need to have shell access.
Plus know a little bit about how Linux works..
Here's an example of how the public_html folder was set up for a customer of mine that uses Laravel:

Bash:
$ ln -s laravel/public public_html
admin@admin:~/domains/domain.ltd$ ls -alh
total 144K
drwx--x--x  7 admin admin  4.0K Aug 10 18:37 .
drwxr-x---  9 admin access 4.0K Aug  9 23:33 ..
drwxr-xr-x  2 admin admin  4.0K Jul 27 17:49 .htpasswd
-rw-r--r--  1 admin admin  113K Jul 27 17:49 index.html
drwxr-xr-x 13 admin admin  4.0K Aug 10 11:46 laravel
drwx------  2 admin admin  4.0K Aug 10 00:10 logs
lrwxrwxrwx  1 admin admin    13 Jul 27 17:49 private_html -> ./public_html
drwx--x--x  3 admin admin  4.0K Jul 27 17:49 public_ftp
lrwxrwxrwx  1 admin admin    14 Aug 10 18:37 public_html -> laravel/public
drwxr-xr-x  2 admin admin  4.0K Aug  1 00:10 stats
 
Login via SSH.
Install composer.

go to your public_html

Code:
cd /home/username/domains/your.domain/public_html

Install a project
Code:
composer create-project laravel/laravel:^8.0 example-app
 
cd example-app
 
php artisan serve

And change your htaccess so your domain will go directly to your laravel folder.
 
Back
Top