[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 60
  • Last Modified:

symlink in htaccess go error 500

Hi
 I have centos 6.3 server with "Virtulmin" ext for domain management for each domain I build i must remove the symlink from the htaccess otherwise i get error 500 any suggestion
thanks
0
maxman100
Asked:
maxman100
  • 4
  • 2
2 Solutions
 
gheistCommented:
It is as security feature. You have to map real direcotries.
0
 
maxman100Author Commented:
Thank you for your respond
 I drive the  Virtualmin other than "HOME" default home directory "in my case /var/www/html"
how can map it please concern that I"m newbie in Linux

thanks again
0
 
gheistCommented:
Apache Documentation is here (middle column - read all)
https://httpd.apache.org/docs/2.4/

You need to add alias in httpd.conf where you attempt to stick symlink.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
Daniel McAllisterPresident, IT4SOHO, LLCCommented:
You can allow sym-links in apache on a directory-by-directory basis, or you may be blocking them on a system-wide basis.

The most common time this shows up is when people upgrade older Apache systems to newer ones (usually in a jump from, say RHEL 5 to RHEL 6)... as the default behavior has changed.

I hope this helps point you in the right direction for complete assistance.

Happy Holidays!

Dan
IT4SOHO
0
 
gheistCommented:
PHP will not work with symlinked directory... And it is a security hole,a nd kills chroot if you wish one etc.
0
 
Daniel McAllisterPresident, IT4SOHO, LLCCommented:
The above statement is not necessarily true...

Symbolic Links are a filesystem "shortcut" to a different file... they can be either:
 - RELATIVE (which is to say, relative to the current location), or
 - ABSOLUTE (which is to say, points to an absolute location)

For example, if I'm currently in /home/users/user1 and I want a symbolic link to /home/users/user2/file I could reference it in either fashion:
 - ln -s ../user2/file .
 - ln -s /home/user2/file .

In the former case, I'm using a relative symbolic link, in the latter an absolute one...

The difference in this case is that, especially in the case of "deep" files (or those instances when you're chrooted) -- the RELATIVE link will still work, whereas the ABSOLUTE link will be useless.

Symbolic Links in a Windows environment have some security issues... in a Mac or Linux environment, less so -- assuming you're not allowing them in places like /tmp (there are some known exploits about symbolic links and /tmp files&folders).

If you need to use symbolic links in a web environment you MUST use relative links. PERIOD.

I hope this helps.

Dan
IT4SOHO
0
 
gheistCommented:
https:#a38720337 (virtualmin uses PHP)
https:#a38735185 (very detailed explanation for normal systems
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now