0

i'm a newbie and using the cs50 appliance(based on fedora) which is made for cs50 course on harvard university. we use the appliance as a virtual machine and they have set everything ready and any necessary tools installed so we just start "learning"

the teacher made a file named google.html(or test.html) inside a directory called public_html

he then opened chrome and typed(jharvard is the username):

http://loclhost/~jharvard/google.html

i did the same thing, he got a 403 error, i instead got a 404 not found error. he then have set the permissions in a way that the 403 error was gone, i did make everything readable even by the world but still i had a 404.

he said typing:

 http://localhost/~jharvard/google.html

is fine and we don't use:

 http://localhost/~jharvard/public_html/google.html

i tried both of them but got 404 error

i searched a lot, one reason could be that skype is using the port 80 and blocking... so i uninstalled skype even though it was on my windows not the virtual machine. nothing changed. i think that wasn't necessary.

another solution i found was to start apache again. i typed this command in the terminal and started apache:

/usr/sbin/apachectl start

it didn't help either

maybe apache is not installed, the way to understand wether it is installed or not was to go to

http://localhost 

(or ip address) if it shows the "fedora test page" then apache is installed and working. i did so, but instead of "fedora test page" i got a "phpinfo()" page which i think says php is working.

i believe apache is installed and running(if not, why the terminal didn't give any error when i started apache using the above command?). maybe i'm asking a stupid question, sorry for that but what am i missing?

thank you.

asedsami
  • 103
  • 3
  • Check the file /var/log/httpd/error_log for hints. – Guntram Blohm Feb 12 '14 at 04:06
  • 3
    This site is for experience system administrator. Your question would be best ask on SuperUser or Stackoverflow where people are dedicated to help people learning like you. – ETL Feb 12 '14 at 04:07

1 Answers1

0

To make this work you need to understand the apache config file. Look for the document root section of your config and find the directory it points too. Put your file in that directory then you should be able to access the page at : localhost/google.html. Also try 127.0.0.1/google.html in case your host file is not proper. If none of this works post your Apache config specifically the lines concerning the document root.

CJONES
  • 317
  • 2
  • 11