First you say (emphasis mine):
I am trying to access an Apache server on my local machine, but can't get it to work.
But then you say (again, emphasis mine):
When I just run on localhost, I see the it works page!
So unclear what the problem is.When you say you edited the .conf
which one? Apache by default can handle virtual hosts so it’s possible you are running two virtual hosts on your machine with different document roots: One responding on port 80
& the other on port 9876
. Can you exact details of the contents of the file you changed?
EDIT: The original poster indicates they are editing the httpd.conf
in this location:
~/apache/conf/httpd.conf
When the systemwide Apache config is in this location:
/etc/apache2/httpd.conf