Solved

Bad Request (Invalid Hostname) in apache localhost

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ability to create nested list on the UI using PHP, HTML, Javascript 7 45
Apache LDAP Authentication 20 28
Link failure 16 32
Ajax and PHP 4 29
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
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 …

840 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