• 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 all websites in same directory ?

Lionel

New Pleskian
I would like to create all websites in the same directory on centos 7 (/var/www/vhosts/thisdirectory/httpdocs)
For each website, I need one IP adress (so I can't create websites in the same subscription because all website in the same subscription have the same IP) and I need to have ssl with Lets Encrypt.

For now, I have done differents subscription and domains and put in "Apache & Nginx Settings" for each domains :
Code:
DocumentRoot "/var/www/vhosts/thisdirectory/httpdocs"
ServerName www.myfirstwebsite.com
ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/www/vhosts/system/thisdirectory/php-fpm.sock|fcgi://127.0.0.1/var/www/vhosts/thisdirectory/httpdocs/$1

It's works well but not when I try to put ssl with Lets Encrypt (message is that LE can't find the file it create).
I think that Plesk create the directory .well-known/acme-challenge/ in the directory created by plesk : /var/www/vhosts/myfirstwebsite.com/httpdocs

I would like that plesk always put all websites in the same directory. Which file contains the structure of the creation of directory (/www/vhosts/%domain%/) ?
 
I find the problem : when I put a virtualhost, Nginx with Plesk doesn't care about the virtual host. To make Lets Encrypt works well with Plesk when website is in a virtual host, you must NOT use Nginx... Hope Plesk will do something for this !
 
Out of curiosity: Why can't you simply create a subscription per domain? Each subscription can have its own IP address and can use SSL.
 
Each domain have its own subscription and its own IP. But I need all domains to be in the same directory (php files). Beacause I update the files every week, it's easier for me to update only one directory (and take less space on hdd).
When I put virtual host for Apache, it's works well. But with Nginx, it is not possible to redefine the root directory. Plesk should "see" that there is a virtual directory for apache and so, it should put the virtual directory (the root document) for Nginx same than the directory for apache. But for now, Plesk don't do that... I desactivate Nginx, keep my virtual host for apache and Lets encrypt can renew the SSL.
 
Back
Top