LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-22-2019, 09:35 AM   #16
Janvanl
Member
 
Registered: Apr 2015
Posts: 145

Original Poster
Rep: Reputation: Disabled

Thanks scacey,

I forgot directory specific.

Just was on the phone with the customer and need to
do some graphical work first.
Later this evening I will have a look.

regards,
Jan
 
Old 09-22-2019, 09:43 AM   #17
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,725

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by ehartman View Post
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"
 
Old 09-26-2019, 06:29 AM   #18
Janvanl
Member
 
Registered: Apr 2015
Posts: 145

Original Poster
Rep: Reputation: Disabled
Hi,

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.


Regards,
Jan

Last edited by Janvanl; 09-26-2019 at 07:43 AM.
 
Old 09-26-2019, 11:51 AM   #19
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,725

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by Janvanl View Post
Hi,

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/.
 
Old 09-26-2019, 04:07 PM   #20
Janvanl
Member
 
Registered: Apr 2015
Posts: 145

Original Poster
Rep: Reputation: Disabled
Hi scacey,

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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there (do we need) a GUI/tui to create symlinks for the /etc/rc.d/rc?.d directories? Lockywolf Slackware 5 06-22-2018 07:23 AM
Is there any default numbering system for creating symlinks inside /etc/rc3.d/ krssarath Fedora 4 02-09-2013 02:38 PM
FC5 Apache can't display symlinks bricox Linux - General 6 11-22-2006 01:31 AM
Is there a xine plugin to play midis? Is there an alternative player for midis? drdroid Linux - Software 5 02-15-2004 12:33 PM
Apache Symlinks gdw Linux - Networking 1 02-27-2003 07:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration