0

Trying to set up first simple website. I have read through forums. I have so far made the situation worse by trying to change permissions. The site works fine on localhost and on my local webserver.

Initially I was getting the following error for the CSS but all of the images were loading properly.

---.---.--.---/:12 GET http://---.---.--.---/css/styles_hw1e.css net::ERR_ABORTED 404 (Not Found)

Where the IP was for the hosting service.

The HTML head is as follows:

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <!-- Replace this with your own information -->
 <meta name="author" content="" />
    <title>H</title>
 <link type="text/css" rel="stylesheet" href="./css/styles_hw1e.css" />
 <style>
   
   table, th, td
      {
      border: 1px solid black;
      border-collapse: collapse;
      }
    </style>
</head>

I have tried using the following thread to resolve, but now have successfully messed up my ftp permissions.

ERROR 403 in loading resources like CSS and JS in my index.php

and

www-data permissions?

Current permissions for www are

Permissions for www

permissions for html are as follows:

Permissions for html

could someone point me to a good tutorial on permission for linux/Apache web server or other suggestion on how to resolve? I getting ready to just rip everything out and start over.

Thanks in advance for any help

Jonn Mc
  • 15
  • 1
  • 7

2 Answers2

0

404 "not found" means that there was no file with that filename. Changing permissions around won't fix that the file doesn't exist.

Is it possible that you hadn't moved it to the 'css' subdirectory, or that the name was 'styles-hw1e.css' instead of 'styles_hw1e.css'?

asosat
  • 31
  • 3
  • The HTML works fine locally, i.e., the styles file loads from the CSS folder. On the server, the 'styles_hw1e.css' file is both in the CSS folder and the html folder with the index.html file. All of the plain HTML and images are displaying fine. – Jonn Mc Jun 12 '20 at 12:29
0

Well I just figured it out and yes the file was "missing". Windows naming vs linux caught me. The file name is actually styles_HW1e.css, but the HTML is calling styles_hw1e.css. Doesnt matter in Windows but is a problem in linux. Rookie error.

Jonn Mc
  • 15
  • 1
  • 7