When I go to laravel folder, I see ALL FILES INSIDE
I update my question to be " When I go to laravel folder, I see ALL FILES INSIDE", as it is the question that get a detailed answer. So JUMP directly please to my 3rd post below. Thanks!
Hello,
I'm really so so tired after many hours spend on this 403 page on ubuntu. I still have the following :
Forbidden
You don't have permission to access /demo/ on this server.
Apache Server at dev.gowazo.com Port 80
How can I resolve this issue if you can help me please ?
Finally I got the solution and understand the things better. Anyway I will explain, just to help the future person who will come to here to find a solution for his problem, as @bashy, @csuarez and @Ruffles was trying to help me, so THANK YOU again guys for your support.
1 : Follow the steps as explained by @csuarez
2: you will have a your .conf file inside your /etc/apach2/sites-available directory ( ex : mywebsite.conf ), and inside this file, this is what you should understand and I will explain you be presenting my .conf file :
-------------------------- inside mywebsite.conf file is below --------------------------
<VirtualHost 188.169.78.162:80>
ServerName dev.mywebsite.com
DocumentRoot /var/www/html/
Alias /demo "/var/www/html/demo/public/"
<Directory /var/www/html/demo>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/myproject-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/myproject-access.log combined
</VirtualHost>
-------------------------- inside mywebsite.conf file is above --------------------------
A : This line ( <VirtualHost 188.169.78.162:80> ) where you should put or ad the IP of you website or subdomain, here it is the IP of my subdomain (dev.mywebsite.com), so the IP is 188.169.78.162 only, so leave the (:80) after the IP
B : This line ( ServerName dev.mywebsite.com ) means that the name of your server ( server here is a word, so it is mean also you Cloud server, Private server, ... ), so your IP now is linked to the subdomain (dev.mywebsite.com)
C : this line ( DocumentRoot /var/www/html/ ) mean that your root files here here ( /var/www/html/ ) so if I type in my navigator this address (dev.mywebsite.com) I will see the files inside this folder ( /var/www/html/ ), sure you can change it to be ( DocumentRoot /var/www/html/otherDirectory ), and then when I visit (dev.mywebsite.com) I will see the files inside this folder ( /var/www/html/otherDirectory )
D : Here is the most important thing, mentioned by @bashy, the following line :
Alias /demo "/var/www/html/demo/public/"
means that when I visite this link (dev.mywebsite.com/demo) I will see the files inside this folder ( /var/www/html/demo/public/ ), so the link (dev.mywebsite.com/demo) still same, but you will see the files of another directory. This is what I was looking as my Laravel copy is in this folder (dev.mywebsite.com/demo), but the files that the visitors should see are available in ( /var/www/html/demo/public/ ).
Maybe I write a lot of details, but the most important that we all should understand, who knows can't understand easily that really the one who is learning and new in this world, is like a BABY, a small child, that you should take him from his hand and explain him slowly, with example, images and videos if possible, like @csuarez did in his post (point 9) with the YOUTUBE video.
Again thanks for you all, for your time and your help. Regards
Please or to participate in this conversation.