httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Cardinal <jfcardi...@gmail.com>
Subject [users@httpd] Trouble using soft link when requesting image file
Date Tue, 20 Feb 2018 22:08:06 GMT
Environment:
WHM v68.0.29
Apache/2.4.29
CENTOS 7.4

I am trying to configure Apache to follow a symbolic link from one account's
public_html folder to another account's public_html folder. So, if Account1
has a soft link "slink":

~account1/public_html/slink -> ~account2/public_html

Given the above, assets are available via two paths:

account2.com/index.html is the same as
account1.com/slink/index.html

account2.com/st/site.css is the same as
account1.com/slink/st/site.css

I added the symlink, and things seemed to work, including html, css, and
javascript files, files in subfolders, etc. The problem is, image files
don't work. The log shows a 404 error when accessing via the soft link.

account2.com/image.jpg (200)
account1.com/slink/image.jpg (404)

The image files have the same permissions/owner/group as the text files.

I've searched for a solution but I haven't found any other example of
someone with the same goal/problem. One thread said that Apache's
memory-mapped files capability might cause symlink failures, and that using
"EnableMMAP Off" might solve it. I do not have a lot of experience
configuring Apache, so I am wary of adding that config option without more
confidence it will solve the problem, and a better understanding of any
performance implications. Perhaps more to the point, I don't know exactly
where to add it... maybe in the v-host section for account1 (the one with
the soft link)?

Has anyone encountered this problem before?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message