Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using the following command on my ssh terminal-

 curl -v -L http://mysite/path

to request some data. However, its returning a 404 error(the site is hosted on the same server). But using curl to request data from some other site such as google is working perfectly fine.

Also, the above url loads up perfectly in a browser and on using the same curl command from my localhost terminal to the above url loads up the data just fine.

Is there something amiss? By the way, the server vps is having centos 5.9,64 bit.

share

migration rejected from stackoverflow.com Jun 21 '13 at 8:37

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as too localized by nhinkle Jun 21 '13 at 8:37

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Look in the server logs. –  n.m. Jun 20 '13 at 8:45
comments disabled on deleted / locked posts

2 Answers

Your server has at least two IP addresses: the external IP and the internal loop one (127.0.0.1). In most setups, the web server's virtual hosts are configured to listen on all available IPs, but it looks in your case the virtual hosts are listening only on external IP. So you need to change the vhost configuration from, for example, 1.2.3.4:80 to *:80 and then you'll be able to request your site from the same server.

share
add comment

seemed to be an issue of outdated curl libraries.. updated to the latest one from this repo - http://nervion.us.es/city-fan/yum-repo/city-fan.org-release-1-12.rhel5.noarch.rpm .. thx for all the help nonetheless...

share
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.