• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question How to create Symbolic links on PLESK ONYX

Elita

New Pleskian
Hello, recently moved from Virtualmin to PLESK web pro edition for security reasons. The application on the server is hand-written and works like this: all the code files stays on the main domain but application is executed on many subdomains. To perform this I need to create symbolic links to the code that residue on main domain on each subdomain. Unfortunately, I am not able to perform this action as I did it on webmin:

1. through ssh I created symbolic link to the directory with ln -s command;
2. edited Apache config file so that those links working with
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI +FollowSymLinks -SymLinksIfOwnerMatch

now by runninning command ln -s I have whole directory copied in subdomain!?!?! and directory /etc/apache2/sites-enabled contain only default site.
Could you, please, help me with resolving this problem?
Otherwise I have to go back to the old server solution.
 
I make use of symbolic links to make a (probably?) similar scenario possible, but your question is too cryptic to answer it.
Give some actual examples where the data is and what you want to achieve.

Sites are hosted in /var/www/vhosts/<domain name>/httpdocs
You should leave /etc/apache2/sites-enabled alone.
 
Sorry for that.
I have a domain - "programma.com" and code files in folder named "programma" (they are located outside httpdocs directory for security reasons).
In order to run application, I need to create subdomain e.g. demo.programma.com, and create symbolic link to the folder "programma" so the subdomain could use core application codes.
when hosting on Virtualmin, I had to do following:
create symbolic link using:
ln -s /home/programma.com/programma /home/programma/domains/demo.programma.lv/public_html/programma

Now i tried this:

ln -s /var/www/vhosts/programma.com/programma /var/www/vhosts/programma.com/demo.programma.com/programma, but get all folder copied instead.
 
Last edited:
Yes....
But what's wrong with that?
That's how symbolic links work....
Now you need to point your hosting to programma instead of httpdocs.
You can also let Plesk create a folder and use SSH to remove the folder and replace it with the symbolic link.

Where's index.php ??

You also need to change the rights of the folder /var/www/vhosts/programma.com/programma
The group needs to be psacln
The user I don't know really.
I would make it the same as the first site you want to host and test it properly.

Then see how it works for the next site....

You can also mount a folder on another folder, but I think you're better of with symbolic links (more a gut feeling).
 
But what's wrong with that? - i dont know.... in webmin symbolic link was just a link (i mean i saw it visually like a link) now there is bunch of files. What happens when I change smth in core files? Will changes reflect those in copied folder?
index.php is in root porgram folder and of course, there is other index.php in subdomain folder that includes that :)
 
what about that mounting possibilities? All I need is that core files would be in one place so I dont bother making changes in every subdomain.
 
Back
Top