Problem:
When I access Mydomain.com, it will show me an error with this information:
403 Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
---------------------------------------------------
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at MYDOMAIN.COM Port 80
What I did to get this error:
The first to know is that the website was working alright. Everything was in its place and in the way it had to work. However, I made a wrong choice. I decided to create a folder called "htdocs" and then, I copied the files of "public_html" to "htdocs" and after that I got my first error which said about No file or directory, I really don't remember that first error. After that, I thought it was due to the existence of a "public_html" and a "htdocs" folder at the same time, so I deleted "public_html", however, nothing changed I kept on having the same error. Therefore, I decided to create a folder with that name "public_html" and then I had a backup of the files of the server so I just put the stuff back in that folder, how it was. Nonetheless, after doing this I got this error that I quoted above. When this happened I searched on Google and read something about this is due to permissions, so I changed all the "public_html" folder to 755 and the folder "www" I changed that, too. After this I went to
www.mydomain.com and the website was not working properly, for example, the background-images did not appeared, and most of the CSS files were not loading, some of the
js too, etc. It was an incomplete loading of the website. So I thought it was because of permissions, so I started moving permissions in "public_html" to 644, 750, etc, and then I found some error_logs, in the "public_html" because there, I had my pages, like index.php, contact.php, aboutus.php, etc. And also there was an error_log in my folder of images, because the website uses a php line to randomize the picking of the background of the page when a visitor access it. Thus, I thought this was the origin of all my problems, and I changed it and nothing happened. After this I put my whole website from php to html, all index.php, contact.php, ETC.php, I put it into ETC.html, and it did not work either (Don't think I simply changed the format by typing it at the end, no no, I did it correctly).
What should be done in a case like this? Is there a solution or is it better to restart the server (if possible) or what?
Note: I have poor knowledge about server administration because I am new, however, I wish to learn.
Good thing I get in these situations. Good for learning.