title: curl return 404 error on any file in the server, suspecting it is trying to load another directory
body: <p>I have a client and I need to execute a curl script on it's server but I get a 404 error.</p>
  
  <p>First I tried the other suggestions I've found on other solutions here (adding headers, cookies...)</p>
  
  <p>After that I asked for a SSH access to be able to check more and that's what I've found:</p>
  
  <p>The only URL that doesn't returns a 404 is the home <a href="http://aksentropis.com" rel="nofollow noreferrer">http://aksentropis.com</a> and it doesn't return the homepage's content it just return
  <code>&lt;html&gt;&lt;body&gt;&lt;h1&gt;It works!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;</code></p>
  
  <p>So I've decided to investigate where this text could be and I've found it on another completely different directories using grep:</p>
  
  <p>./usr/src/httpd-2.4.23/docs/docroot/index.html:1
  ./usr/local/apps/apache2/www/htdocs/index.html:1</p>
  
  <p>I've entered those directories and they only contain the index.html file</p>
  
  <p><strong>But, the main folder for public_html is on:</strong></p>
  
  <p>/home/admin/public_html</p>
  
  <p>How can I fix that, or what should I do? I only have a ssh root access.</p>
  
  <hr>
  
  <p>Update: if I call the url from another server it just works...</p>
  
  <hr>
  
  <p>Update: I've found the DocumentRoot in the apache was misconfigured.</p>
  
  <p>It was pointing to
  DocumentRoot "/usr/local/apps/apache2/www/htdocs"
  and I've updated it to
  DocumentRoot "/home/admin/www"</p>
  
  <p>Now it loads the php but it doesn't execute it. Why is that?</p>