#StackBounty: #linux #networking #google-chrome #permissions #apache-http-server Apache not serving some content from network share

Bounty: 50

Apache is not serving some content from a mounted network share for me on Ubuntu.

Depending on the content of the file I try to open it is not correctly served:

This does not work:

is a link to another nifty site
<H2>This is a Medium Header</H2>

Chrome issues the following error message: "ERR_INVALID_HTTP_RESPONSE"

Postman: "Error: Parse Error: Expected HTTP/"

curl: "curl: (1) Received HTTP/0.9 when not allowed"

This works (just one more blank line)

is a link to another nifty site
<H2>This is a Medium Header</H2>


The network share is mounted in /media/data (cifs; for testing purposes permissions are set to 777)

There’s a symbolic link from /var/www/server to /media/data and i can see and change the contents from inside the VM.

It does not make to much sense to me that apache is picky about the file contents. I’m not entirely sure how to interpret the error messages from the 3 different clients, but since all of them are failing it looks like Apache is the issue even though the error log does not show any problems.

After copying the file to /var/www/html (default directory) and changing the vhost to that location the files get served no matter what the content is.

I don’t know if this does matter at all but while searching "ERR_INVALID_HTTP_RESPONSE" online I found some people talking about chrome behaving weirdly on some ports: I’m currently running the server on Port 28080 (for backwards compatibility with the current setup and because I’m planning on setting up nginx on port 80); nginx is already installed but I don’t think it’s interfering.

Please excuse me if this sounds somewhat confusing but that’s propably just because I’m utterly confused myself.

This is a clean VM, the only additional packages are apache, nginx and cifs-utils as far as I know.

Has anyone else encountered weird behaviour with network shares in this context? I want the htdocs on the network share since it is easier for me to access from my windows machine, are there any recommended ways of accessing the htdocs other than a network share?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.