Public url issue in aws in laravel
I have hosted my site on aws through ftp,
now when i access this
url : http://X.XXX.XXX.X/projectfoldername/

i can access the page after i use
http://X.XXX.XXX.X/projectfoldername/public
but i want to remove public changed htaccess file also but when i upload it on cpanel it is working.
.htaccess file :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/ [L,QSA]
</IfModule>
Any help is highly appreciated
Did you change the document root folder to ./projectFolder/public
For nginx, please refer to this: https://laravel.com/docs/8.x/deployment#nginx
For apache, change the virtual host stuff:
Example:
<VirtualHost *>
DocumentRoot /project/public/
</VirtualHost>
Thanks @frankielee Where do i will find this file on aws i have ftp access?
only ftp?
no ssh access?
Please remind that, unless your account has the correct privileges, else you can't modify the files.
First, you have to make sure the server is using apache or Nginx.
After that, just google using the keywords. You should be able to find those steps.
http://X.XXX.XXX.X/projectfoldername/.env
Also, please check if you are to reach your .env file using the URL. If yes, please temporarily remove your .env file from the server.
For safety, please change those sensitive data like MySQL passwords etc.
Please or to participate in this conversation.