Getting a 'Not Found' error on my website?

2019-09-04 07:53发布

问题:

I'm trying to upload files to my domain that I'm hosting with Dreamhost. I connected to the server with FileZilla and I'm pretty sure I put the files in the right spot.

Their tutorial says to create a directory with your domain name like this: 'mydomain.com' and put your files in there. I put an index.html, p.css, register.php, login.php, and logout.php file in there. However, when I navigate to mydomain.com in Google Chrome, all I see is this:

Does anybody know what could be causing this? BTW I didn't actually create a directory called "mydomain.com" I used the domain I own.

UPDATE:

The directories are set up like this:

/
    mydomain.com
       public_html
           register.php
           main.css
           logout.php
           login.php
           index.html

回答1:

Can you make sure you have group read permissions on the file you are attempting to fetch?
You want permission each file has a 755 permission, here is how you would change a file permission in FileZilla.

Also, make sure everything is in the public_html file.

public_html/index.html
public_html/p.css
public_html/register.php
public_html/login.php
public_html/logout.php


回答2:

Try adding a file named .htaccess to your public_html directory. In this file, put the following line:

DirectoryIndex index.html

Assuming the webserver is Apache (or a work-alike) this tells the server to send index.html whenever someone asks for /.



回答3:

I finally figured it out. For some reason it wasn't working when the directory was labeled mydomain.com. I changed it to mydomain_com and it fixed it for whatever reason. Thank you to cevaris and Amazed for helping me.