Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Another observation: I do not know how strong the "chroot" in Apache is (never used this myself), but you might try to use relative, not absolute, paths for the links as "/" may not be the same for Apache as for the whole filesystem.
So if the directory you want to link TO is /var/www/htdocs/some/dir
and the link should be in the directory /var/www/htdocs/somewhere/else
create the link by using
Code:
cd /var/www/htdocs/somewhere/else
ln -s ../../some/dir <name of the link>
so that you never have a pathname with "/" as the starting directory.
I'm sorry ehartman, but I have to speak up again.
Either absolute or relative paths will work. I use both. My personal preference is absolute paths because then the location of the linked to directory is clear.
But, ultimately, apache doesn't care. It lives on the filesystem, and (absent the use of VirtualHosts, which changes the "chroot" (DocumentRoot) for different host/domain names) "/" in a URL means "/var/www"
I checked with <directoy> in .htaccess that produces a 500 errror
I checked apache2.conf it allows Symlinks for /var/www/*
From the commandline the symlink works as expected.
Seems I must try with something different from CMSMS to see if that is the problem.
[Edit]
I made a simple html-file where I load an image from "/uploads/images/ap/images/image01.jpg"
The directory "/uploads/images/ap/" is a physical directory, the directory "images" inside "ap"
is the symlink.
In Firefox, the image from the symlinked directory is shown normally.
So, it seems a problem in the filemanager in CMS Made Simple.
I checked with <directoy> in .htaccess that produces a 500 errror
I checked apache2.conf it allows Symlinks for /var/www/*
From the commandline the symlink works as expected.
Seems I must try with something different from CMSMS to see if that is the problem.
[Edit]
I made a simple html-file where I load an image from "/uploads/images/ap/images/image01.jpg"
The directory "/uploads/images/ap/" is a physical directory, the directory "images" inside "ap"
is the symlink.
In Firefox, the image from the symlinked directory is shown normally.
So, it seems a problem in the filemanager in CMS Made Simple.
Perhaps, but I'll say this again (because I spent about a week learning it, back in the day - like to drove me crazy!)
A +FollowSymLinks must be specified for the specific directory in which the link lives.
A +FollowSymLinks for /var/www/ will not turn on FollowSymLinks for /var/www/subdir/.
I run kubuntu 16.04 with apache2.
In my apache2.conf it allows Symlinks for /var/www/* with asterix.
I did not specify a directory and still I can present an image out of the symlinked directory.
Do you run another distro?
For the record, just installed the latest CMSMS, 2.2.12 with another wysiwyg editor, that is TinyMCE 3.3
now it is working like it should.
regards,
Jan
Last edited by Janvanl; 09-26-2019 at 05:41 PM.
Reason: solved
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.