Earlier today I successfully connected to my Apache server both via http:/localhost and IP address. I turned off the server briefly and when I ran it again, I was only able to connect via IP (which connects successfully from my computer as well as others in the network).
I checked to make sure that my ServerRoot and DocumentRoot were C:/Apache24 and ${SRVROOT}/htdocs respectively as well as that all my server-related files were in htdocs. Additionally, I verified this issue on both Chrome and Firefox (where I also tried clearing the cache).
Any suggestions regarding how to fix this would be greatly appreciated.
Here are the lines I referenced in my httpd.conf file (spliced together):
Define SRVROOT "C:/Apache24"
ServerRoot "${SRVROOT}"
DocumentRoot "${SRVROOT}/htdocs"
<Directory "${SRVROOT}/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
I would be happy to elaborate on any pertinent information I may have neglected
CodePudding user response:
By setting the "Listen" setting to a specific IP address and port as opposed to a port, I stopped my computer from accessing the site via localhost. By updating the httpd.conf file to read "Listen 80" I resolved this issue.