Why don't my local Apache open html pages?

So, I am running Apache on my laptop.

If I go to "localhost", I get a page that says:

If you see this, it means that the installation of the Apache web server software on this system was successful. Now you can add content to this directory and replace this page.

except, I cannot add content and replace this page.

I can click on its links and it works fine.

First of all, there is not even an index.html document in this directory. If I try to get direct access to the one I created using localhost / index.html, I get "The request URL was not found on the server." So I don’t even know where this page comes from. I searched for the words on this page in the apache directory and nothing works. Something seems to be redirected.

As a test, I KNOW that it loads localhost / manual / index.html (no matter what it is), so I tried replacing it with something that I wrote and received a message

The server detected an internal error or incorrect configuration and was unable to fulfill your request.

The error log says:

[Fri Sep 12 20:27:54 2008] [error] [client 127.0.0.1] A syntax error in the type map, no ':' in C: / Program Files / Apache Group / Apache2 / manual / index.html for the header \ r \ n

But this page works fine if I open the browser directly.

therefore, in principle, I do not know what I do not know here. I'm not sure what Apache is looking for. I am not sure if there is an error in my configuration file, my html page or what.

Oh, and the reason I want to open this using apache (basically) is because I'm trying to check some php, so I'm trying to run apache locally.

Thanks.

+4
source share
3 answers

"By default, your pages should be placed in the" C: \ Program Files \ Apache Group \ Apache2 \ htdocs "folder for Apache 2.0 and" C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ htdocs "for Apache 2.2. When Your site is ready, just delete the existing files in the folder and replace them with the ones you want to check.

From here .

+4
source

OK,

To answer my own.,. I found that the β€œListen” directive in the configuration file was set to β€œListen 80” instead of β€œListen localhost: 80”.

Also, localhost / htdocs / index.html does not work, but localhost / index.html does.

Hope this can help someone in the future.

Thanks, Schroeder.

+1
source

If you have Skype, it also uses the same ports (80, 443) as Xampp. Therefore, start up Xampp first and then Skype.

[source: http: // starikovs .com / 2011/02/23 / apache-doesnt-start-in-xampp /]

0
source

Source: https://habr.com/ru/post/1276675/


All Articles