The server doesn't serve static files correctly.

Viewed 37

Hi,

I deployed Apache Answer(ver. 1.4.5) on the Ubuntu server and it can't serve images and uploaded attachments correctly to the browser.

The server returns HTTP 403.

  • Path to the executable: ~/apache-answer-1.4.5-bin-linux-amd64/
  • Path to the uploaded images: ~/apache-answer-1.4.5-bin-linux-amd64/answer-data/uploads/post/5smt4sbUZA9.png
  • Path to the uploaded attachments: ~/apache-answer-1.4.5-bin-linux-amd64/answer-data/uploads/files/post/5smfTQVm1EU.pdf

Then in the browser, I check the URLs, and they are

Image: http://plusai.site/uploads/post/5smt4sbUZA9.png
Attachment: http://plusai.site/uploads/files/post/5smfTQVm1EU/test.pdf

Pay attention to the attachment path, which on disk is 5smfTQVm1EU.pdf while in URL is 5smfTQVm1EU/test.pdf

The image's path matches the URL, but gets HTTP 302 with location 403.
How can I get them work ?

0 Answers