Solved

Bad Request (Invalid Hostname) in apache localhost

Posted on 2012-03-12
5
1,947 Views
Last Modified: 2012-03-12
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.
0
Comment
Question by:haloexpertsexchange
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:fundacionrts
ID: 37711791
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.
0
 
LVL 13

Author Comment

by:haloexpertsexchange
ID: 37711800
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?
0
 
LVL 8

Expert Comment

by:fundacionrts
ID: 37711865
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
0
 
LVL 8

Accepted Solution

by:
fundacionrts earned 400 total points
ID: 37711878
SQL Server 2008 R2 Reporting Services could by listen on 8080 by default (depending of your OS version)

http://technet.microsoft.com/en-us/library/bb630449.aspx
0
 
LVL 13

Author Closing Comment

by:haloexpertsexchange
ID: 37711973
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.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question