Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Where is http://localhost defined I get HTTP 404 Not Found

Posted on 2011-10-24
13
Medium Priority
?
564 Views
Last Modified: 2012-05-12
I uninstalled individual elements PHP, MySql, Apache and Netbeans IDE which had worked fine for me in earlier versions, I installed the latest versions and could not them to work together so I uninsalled them and downloaded WAMP and things got better, I re-installed netbeans and the only problem I have is when I run projects in netbeans I get HTTP 404 Not Found, is there somewhere I can set localhost in the environment, in netbeans in apache so I can run my projects

Thanks

John
0
Comment
Question by:johnecollins
  • 6
  • 6
13 Comments
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 37018424
On the Project panel on the left side of Netbeans right click on your project: choose Properties. In the new windows select Run Configuration and set there parameters of your local web server.

Cheers
0
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 37018548
Just a suggestion: install xampp, or a turnkeylinux.org lamp server in virtualbox.
0
 

Author Comment

by:johnecollins
ID: 37018781
marqusG,

Thanks for a swift reply unfortunately I am new to some of the issues I am working through,

I have installed wamp
the htdocs is in  c:\wamp\bin\apache\apache2.2.21\


project-properties-some.docx
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:johnecollins
ID: 37018822
marqusG

Thanks for your swift reply

I am struggling with what to put where

I have the htdocs directory in

C:\wamp\bin\apache\Apache2.2.21\

I have atteched screen prints of the project properties could you possibly let me know how to filll it in so I can get this to work

Thanks

John project-properties-some.docx
0
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 37018829
Referring to your image, look at the left panel with a white background: is selected Sources; now select Run Configuration item (immediately below): in the Project url edit box type:

http://localhost/your_project_folder/

and it will work fine.

Cheers
0
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 37018896
Look at the attached image.
netbeans0.jpg
0
 

Author Comment

by:johnecollins
ID: 37019592
MarqusG,

I believe I have setup the project as you said but I am still getting the 404 Not found I have attached screen prints of the setup files.

The only thing I can imagine is that I have made a typo but I cannot see one

Could you check that what I have done so far is ok.

I also believe that this would work for netbeans 6.8 but I don't have access to that machine at the moment so I cannot check

John
r3dataconfig.docx
0
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 37022736
johnecollins, I use Netbeans 7.0.1 not 6.8. Please, give more details about 404 error: the exact text displayed on the page and overall the url displayed in the address bar of your browser. Maybe this could give us something to think about, since I can see any typo in your screenshots.

Cheers
0
 

Author Comment

by:johnecollins
ID: 37023413
Hi MarqusG,

Thank you for your response,

In a desperate effort to try and sort this out I uninstalled wamp and netbeans then installed wamp now I know that the wamp app runs at localhost so I went to C:\wamp\bin\apache\Apache2.2.21\htdocs looked at the index.php there added my name to the title, setup a shortcut to http://locathost/ and pressed ok and got the wamp app not the "It works" app you get when 1st installing Apache.

So now I know localhost is NOT at C:\wamp\bin\apache\Apache2.2.21\htdocs - so now I am investigating where it could be.

Any light you can throw on this would be very welcome and thank you so much for your patience so far

Cheers

John

 screenprint of 404
0
 
LVL 31

Accepted Solution

by:
Marco Gasi earned 2000 total points
ID: 37023462
Ho, what  a stupid I am! Wamp places localhost in c:\wamp\www\folder So you have to place there your project folders! Alternatively, you can edit this value: right-click on tha Wamp tray icon and choose Apache->httpd.conf. This opens the Apache's configuration file in your default text editor. Look for a line like

DocumentRoot "c:/wamp/www/"

you can comment it placing a # before

#DocumentRoot "c:/wamp/www/"

and then you can write a new statement:

DocumentRoot "C:/wamp/bin/apache/Apache2.2.21/htdocs "

or whatever else. I set this value to myy Dropbox folder so I have an instant backup of any script.

Cheers
0
 

Author Comment

by:johnecollins
ID: 37023691
MarqusG,

It works! in the words of a well known test page ;-)

My typing skills were tested but eventually I got it right

I can now download netbeans again and get to work

Thank you so much

If you find me in a pub - an unlikely occurrence ???? I'll happily buy you a beer

Cheers

John
0
 

Author Closing Comment

by:johnecollins
ID: 37023699
Thank you so much for your help and patience

John
0
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 37023747
You're welcome. Good luck for your project and... on to the next ;-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
The viewer will learn how to count occurrences of each item in an array.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

581 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