Hello Bryson,
Thank you, it is a good question. The feature is supported by apache and by nginx. When you install Plesk 17.9, Plesk is installed with pre-configured "VirtualHost" in apache and "server" in nginx; the web-service proxies all requests to internal 127.0.0.1:8880. The web-service uses an individual SSL certificate for Plesk Panel; it is the same certificate that Plesk Panel uses for connection on the 8443/tcp port.
apache:
Code:
<IfModule mod_ssl.c>
<VirtualHost ip.ad.dre.ss:443>
SSLEngine on
SSLVerifyClient none
SSLCertificateFile "/usr/local/psa/var/certificates/certi4vi4d6"
UseCanonicalName Off
LimitRequestBody 2147483647
ProxyTimeout 600
<IfModule mod_proxy_http.c>
<Location />
ProxyPass http://127.0.0.1:8880/
ProxyPassReverse http://127.0.0.1:8880/
RequestHeader set "X-Forwarded-Proto" "https"
Order allow,deny
Allow from all
</Location>
</IfModule>
</VirtualHost>
</IfModule>
nginx:
Code:
server {
listen ip.ad.dre.ss:443 ssl;
ssl_certificate "/usr/local/psa/var/certificates/certi4vi4d6";
ssl_certificate_key "/usr/local/psa/var/certificates/certi4vi4d6";
client_max_body_size 2048m;
proxy_read_timeout 600;
proxy_send_timeout 600;
location / {
proxy_pass http://127.0.0.1:8880;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
access_log off;
}
}
In this case, if you open a server's IP-address or resolvable domain in a browser, you see a Plesk Panel.
A validator on domain creation page doesn't allow you to create a domain that matches with a domain in a browser's address bar.
When you configure a specific domain with CLI (`
plesk bin admin --enable-access-domain "plesk.example.org"`), Plesk reconfigures the section and adds a directive `ServerName "plesk.example.org"` to apache's config and 'server_name "plesk.example.org"' to nginx config.
apache:
Code:
<IfModule mod_ssl.c>
<VirtualHost ip.ad.dre.ss:443>
SSLEngine on
SSLVerifyClient none
SSLCertificateFile "/usr/local/psa/var/certificates/certi4vi4d6"
ServerName "plesk.example.org"
UseCanonicalName Off
LimitRequestBody 2147483647
ProxyTimeout 600
<IfModule mod_proxy_http.c>
<Location />
ProxyPass http://127.0.0.1:8880/
ProxyPassReverse http://127.0.0.1:8880/
RequestHeader set "X-Forwarded-Proto" "https"
Order allow,deny
Allow from all
</Location>
</IfModule>
</VirtualHost>
</IfModule>
nginx:
Code:
server {
listen ip.ad.dre.ss:443 ssl;
ssl_certificate "/usr/local/psa/var/certificates/certi4vi4d6";
ssl_certificate_key "/usr/local/psa/var/certificates/certi4vi4d6";
client_max_body_size 2048m;
proxy_read_timeout 600;
proxy_send_timeout 600;
server_name "plesk.example.org";
location / {
proxy_pass http://127.0.0.1:8880;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
access_log off;
}
}
In such case, if you already have a subscription with this domain in Plesk, a website be overlapped by Plesk Panel because of Plesk Panel's priority.
You can revert a default setting by executing "
plesk bin admin --enable-access-domain" or disable the feature by executing "
plesk bin admin --disable-access-domain". In upgrade scenarios, you need to enable the feature by yourself.