Avatar of haloexpertsexchange
haloexpertsexchange
Flag for United States of America asked on

Bad Request (Invalid Hostname) in apache localhost

I have apache and php installed on my local machine, but when I tried accessing it today I got a bad request invalid hostname error.
I have to manually start apache since I don't need it running most of the time, but today when I try starting it up I see it flash open and then immediately closes. But I am not getting a server not found like I would think that I would see if it was a problem with apache not being started.
I check the apache error logs but I don't see any errors.
I am running apache off of port 8080 and the httpd.conf file still has Listen 8080 and
ServerName localhost:8080 listed and this is what it has been for a while and was working last week sometime and I haven't changed anything that I know of.
Any ideas about what I should check would be greatly appreciated.
Apache Web ServerPHPWeb Servers

Avatar of undefined
Last Comment
haloexpertsexchange

8/22/2022 - Mon
fundacionrts

Do you have another application that is listen on port 8080? Is It posible that you had installed a new software after last succesfully execution of apache?

Try the command line before launch apache

netstat -na | find "LISTEN"

to see if port 8080 is in use.
haloexpertsexchange

ASKER
for 0.0.0.0:8080 it just says TCP and listening
I did just install sql server 2008 r2 though.
Any ideas about how to tell if that is using this port?
fundacionrts

netstat -nab show the executable associated to the port. I recommend you that you redirect the output to a file, an the open with text editor to see better:

netstat -nab >> c:\test.txt
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
fundacionrts

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
haloexpertsexchange

ASKER
That was it exactly.
I had to go into the reporting services configuration manager and edit the web service url port and the report manager url port and then apache fired right up and everything seems to be working fine now.
Thanks for the help.