Solved

Bad Request (Invalid Hostname) in apache localhost

Posted on 2012-03-12
5
1,744 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
  • 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

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
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.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now