Getting a 'Not Found' error on my website?

痞子三分冷 提交于 2019-12-11 20:43:34

问题


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.



来源:https://stackoverflow.com/questions/23175169/getting-a-not-found-error-on-my-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!