1) We have some code that works fine on our local web server, as per:
http:// localhost/project1/start.htm
2) This code is all inside the folder project1. We have moved this whole folder to the root of our domain via Filezilla, so we now have: www.mydomain.com/project1
3) Here's the file structure:
project1 (main folder) --> start.htm
project1 (main folder) --> Player1 (sub-folder) --> class.htm
4) When I type in the URL: http:// www.mydomain.com/project1/start.htm
It works fine and brings up the hyperlink "start the course"
5) When I click on "start the course" I get:
403 Permission Denied
You do not have permission for this request
/project1/Player1/class.htm
I read somewhere that I might have to give privileges to an .htaccess file but I'm not sure if this is the problem or how to proceed.
try chmod 755 for Player1 and files/folders under it..
Related
Im trying to deploy my laravel project with namecheap however I'm getting a 500 server error.I've updated the server.php and index.php to point to the correct directories but I'm still getting the error. I've checked the error.log file in the public_html directory but it doesn't give any error when loading the site. I've also double checked the .env file to make sure the correct database credentials were entered.
index.php
if (file_exists(__DIR__.'/../nue/storage/framework/maintenance.php')) {
require __DIR__.'/../nue/storage/framework/maintenance.php';
}
require __DIR__.'/../nameofproject/vendor/autoload.php';
$app = require_once __DIR__.'/../nameofproject/bootstrap/app.php';
server.php
require_once __DIR__.'/../nameofproject/public_html/index.php';
Whenever I deploy my Laravel project in a sharedhost. These things I do
Copy the entire application directory (appname) inside public_html
Path to the domain will be "public_html/appname/public"
Link storage path using ssh
If your Laravel project is installed in the webroot (assuming public_html), then do the following:
Move the contents of public/ up one dir to the webroot. index.php and server.php should now be in the same dir as your .env.
In index.php, change ../vendor/autoload.php to just vendor/autoload.php and ../bootstrap/app.php to just bootstrap/app.php.
In server.php, change public/index.php to just index.php.
Good Morning,
I am currently setting up and apache2 server on my raspberry pi. My index.html file is in the directory /var/www/html and the file is loading fine when I go to the IP address. However, the images located in /var/www/html/img are not loading. The html is like this: <img alt="image1" src="img/picture1.png">. When I right click on the alternative image icon, and select open image in new tab, I get:
You don't have permission to access /img/picture1.png on this server.
Server unable to read htaccess file, denying access to be safe
How can I prevent this and make the user able to access the image?
Many thanks,
Try
chmod -R 755 /img/
this will set the permission for all files in the folder readable and executable for all, and also writable by the owner.
The output will be in the form
-rwxr-xr-x 1 root root 0 Apr 5 12:38 picture1.jpg
Still fairly new to ec2, I made a new directory as /home/user/www. Opened ftp service that allows git commits to be pushed to the server. This works fine as I can see the files come up. The problem being when I run my site, the Apache test page pops up and when I try opening a page in /home/user/www directory, it says Forbidden, you don't have permission to access / on this server.
I have successfully changed the DocumentRoot
DocumentRoot "/home/user/www"
AllowOverride None
# Allow open access:
Require all granted
and Directory in httpd.config to /home/user/www, all but to no result.
Any help is appreciated. Permissions are 777 for test basis but still no success. User is the owner of all the files in www
Solved my own question. Permissions need to be set on the third directory i.e., www. Therefore, I did chmod 755 ~/www.
Worked like a charm
I created a new virtual host on a VPS. i already point the domain to the server IP address. when I access the website it's gives me error 403 even the public_html has 755 file permission. what could be the problem?
EDIT: i found the following error log.
cannot server directory /home/batiktridaya/public_html: No matching directory (index.html, index.html, index.php, index.php4, index.php5) found, and server generated directory index forbidden by Options directive.
What are the permissions of the files within public_html, also what user is apache running as?
I have a problem in accessing folders inside the public_html directory. When I create a folder inside public_html and try to access it through browser as www.website_name.com/folder_name I am not able to do so.
Your website_name.com domain should be pointed to 'public_html/' (document directory) , Then you can access the folders like that you mentioned 'www.website_name.com/folder_name'
step 1: click on -> "addon domain"
step 2: then you can see a table like this ->
Addon Domains|Document Root| Username | Redirects to|Actions
step 3: in that table you can see your website entry
change the second column "Document root" to "public_html/" if your website files kept in the "public_html". if the domain document root is pointed to the "public_html" you can access the files like this -> "www.website_name.com/folder"
if your website document root is pointed like "public_html/mysite/" - > then you can get the subfolders of "mysite" folder