Why am I getting a 403 error on localhost on this link?
<script type="text/javascript" src="../js/cookies.js"> </script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/base/jquery-ui.css" type="text/css" media="all" />
THE FOLLOWING LINE CAUSES A 403 ERROR
<link rel="stylesheet" href="../themes/base/jquery.ui.all.css" />
<link rel="stylesheet" href="../development-bundle/dem开发者_如何学Cos/demos.css" />
In desperation, I changed the permissions of everything leading to jquery.ui.all.css to 755 which did not resolve the problem.
These are the contents of jquery.ui.all.css:
@import "jquery.ui.base.css";
@import "jquery.ui.theme.css";
Any link I add that has an import statement gives me a 403 error. I spent several hours searching for an answer but no luck. Any ideas? Thank you.
It's pretty easy. One of these directories doen't have permissions (apache2) or that css file has no permission to be opened with apache2
0755 are correct permissions
I performed following steps
Change the owner and/or group of each FILE to OWNER and/or GROUP. OWNER being the one with which you started the server.
chown -R <user> /var/www/html/
When you do - chown --help, one can find the possible usages.
Next, Change permission of the file
chmod -R 755 /var/www/html/
Note -R = recursively applies it to all folders/files within directory
403 error will be resolved.
As mentioned in https://www.digitalocean.com/community/questions/proper-permissions-for-web-server-s-directory
精彩评论