New on LowEndTalk? Please Register and read our Community Rules.
symlink on index.php file
I have roundcube stored in /etc/zpanel/panel/etc/apps/webmail/ and I want to point it from webmail.mydomain.com. So I have created a subdomain, created a new home directory for that domain and a symlink like this:
ln -s /etc/zpanel/panel/etc/apps/webmail/index.php /var/zpanel/hostdata/zadmin/public_html/webmail_mydomain_com/index.php
so now I should be able to point webmail.mydomain.com and accessing to roundcube but it doesn't work, I get a white page and nothing loaded.
Any suggestion?
thanks
Comments
Just copy the file.
It cannot work, I cannot simply copy index.php because it has to be in the right directory in order to work.
What does your error log say?
Do you have selinux enabled?
Are proper permissions set?
You should symlink the directory, not index.php.
you might want to rename topic, when I clicked on it, it went to a 404 page:
http://www.lowendtalk.com/discussion/7102/symlink-on-index.php
This thread is now an exclusive club.
I don't know why but I changed title and now the thread is available.
@joepie91 is right, you shouldn't be linking only index.php, it won't work. You need to link the whole subdir.
And besides make sure that FollowSymLinks are set if u r using apache.
The problem is that with zpanel I can create a subdomain's home directory inside public_html and I cannot make a symlink with existing directory..
Have you asked zPanel developers?
I just left a message on the forum.
@ledzgio link it as a subdirectory and set a redirect there from subdomain root. Or delete original dir and create a symlink instead.
Anyways this isn't a good way to do. Usually when you have a software installed somewhere and want to link it to subdomain you just setup a correct location/alias in config files.
I'm not familiar with zPanel though.
Replacing these lines:
php_admin_value open_basedir "/var/zpanel/hostdata/zadmin/public_html/webmail_mydomain_com:/var/zpanel/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
with:
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
did the trick. I don't know if it is correct but it just works.
That is a really really bad idea. You just effectively turned off the cross-user security in zPanel.