0

I have a Laravel project, I want to deploy it into the server, the thing is that normally we have index.php and .htaccess inside the public folder, but in my case, I have brought these two files into the root. So I want to know, what are the changes needed in serve?

How can I upload this to server?

2 Answers 2

2

Solution 1 Somehow you need to get the ssh access as a shared user from your hosting provider and then you can use git to clone your repository into your server.

Solution 2 You can copy paste all of your project into the server using ftp from your cpanel or relevant control panel.

Solution 3 Use Amazon as your hosting as it gives 1 year free tier access, and also gives you ssh service. Follow the solution 1 after getting this.

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

Comments

0

Put back the files to the public folder. You can change the root path of your server to your project's public folder.

Follow the steps to do:

  1. Go to /etc/apache2/sites-enabled/
  2. Open the .conf file inside this folder
  3. Change the docuementRoot to /etc/var/www/html/project_name/public

Restart the apache server using the following command:

sudo systemctl restart apache2

2 Comments

This probably isn't possible in shared hosting.
It is possible in some hosting providers. You will get a limited access, just will not be able to update core server files.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.