Solved

Bad Request (Invalid Hostname) in apache localhost

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

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Join & Write a Comment

Suggested Solutions

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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 …

746 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

9 Experts available now in Live!

Get 1:1 Help Now