When I type 127.0.0.1 in address bar of browser, I get the following result:
Not Found The requested URL / was not found on this server. Apache/2.2.22 (Fedora) Server at 127.0.0.1 Port 80
What can cause this problem?
You are asking the server for
/. The server, unlike the question title may suggest, is indeed accessible, and it tells you the URL was not found.
You get, in the logs, the error "Directory index forbidden by Options directive", for the filesystem directory which is — I suppose — being served as
You tried to check if the permissions are okay for the webserver to read the folder, but what the error message is saying is not "Unable to read directory ...", it is saying it cannot deliver a directory index as a response because that is currently not allowed under the current server configuration.
Either add a file under a name the server can serve as
/ (these are frequently
index.html and the like) or change the server configuration to allow directory listing, depending on your goal...
As previously said, you're able to access localhost, you're just not able to get the directory listing. Either place an index.html file in the root directory or enable directory listing. To enabled Directory Listing:
$ sudo vi /etc/httpd/conf/httpd.conf
<Directory /> </Directory>
Edit it to look like:
<Directory /> Options Indexes FollowSymLinks AllowOverride None </Directory>
Save the configuration (escape character: wq!)
Then you'll need to restart apache:
$ sudo /etc/init.d/httpd restart
You should now see a directory listing when connecting 127.0.0.1 on port 80.