概要: To host websites, Plesk for Linux uses the Apache and/or Nginx webservers. For the websites to work correctly, their configuration files must be in order.

In this topic, you will learn about the structure of Apache and Nginx configuration files in Plesk for Linux.

Note: this topic explains how Plesk works “under the hood”. It is not useful to anyone without Linux system administration experience.

Apache 配置文件

所有 Plesk 特定的 Apache 配置文件都通过文件 zz010_psa_httpd.conf 使用 Include 指令包括在 Apache 系统配置(默认是 /etc/httpd/httpd.conf )中。文件 zz010_psa_httpd.conf 根据操作系统的不同可能位于 /etc/apache2/conf.d//etc/httpd/conf.d/ 中。

The following list represents the hierarchy of Apache configuration files.

  • /etc/httpd/httpd.conf
    • => /etc/httpd/conf.d/zz010_psa_httpd.conf
      • => /etc/httpd/conf/plesk.conf.d/server.conf
        • => /etc/httpd/conf/plesk.conf.d/ip_default/@<domain_name>.conf -> /var/www/vhosts/system/<domain_name>/conf/httpd_ip_default.conf
      • => /httpd/conf/plesk.conf.d/horde.conf
        • => /httpd/conf/plesk.conf.d/webmails/horde/<domain_name>_webmail.conf
      • => /httpd/conf/plesk.conf.d/roundcube.conf
        • => /httpd/conf/plesk.conf.d/webmails/roundcube/<domain_name>_webmail.conf
      • => /httpd/conf/plesk.conf.d/atmail.conf
        • => /httpd/conf/plesk.conf.d/webmails/atmail/<domain_name>_webmail.conf
      • => /httpd/conf/plesk.conf.d/vhosts/@<domain_name>.conf -> /var/www/vhosts/system/<domain_name>/conf/last_httpd.conf
        • => /usr/local/psa/admin/conf/file_sharing.conf*
        • => /var/www/vhosts/system/<domain_name>/conf/siteapp.d/*.conf
        • => /var/www/vhosts/system/<domain_name>/conf/vhost_ssl.conf
        • => /var/www/vhosts/system/<domain_name>/conf/vhost.conf*
      • => /httpd/conf/plesk.conf.d/forwarding/<domain_name>.conf
      • => /httpd/conf/plesk.conf.d/wildcards/@<domain_name>.conf -> /var/www/vhosts/system/_<domain_name>/conf/last_httpd.conf

文件 file_sharing.conf 未生成,但是与 Plesk 附带提供。

来自 siteapp.d/*.conf 的文件与相应的 APS 包附带提供。

占位符 <domain_name> 是为其生成配置的网站的域名。

nginx 配置文件

所有 Plesk 特定的 nginx 配置文件都通过文件 zz010_psa_nginx.conf 使用 Include 指令包括在 nginx 系统配置(默认是 /etc/httpd/nginx.conf )中。文件 zz010_psa_nginx.conf 位于 /etc/nginx/conf.d/ 中。

The following list represents the hierarchy of nginx configuration files.

  • /etc/nginx/nginx.conf
    • => /etc/nginx/conf.d/zz010_psa_nginx.conf
      • => /etc/nginx/plesk.conf.d/server.conf
      • => /etc/nginx/plesk.conf.d/vhosts/@<domain_name>.conf -> /var/www/vhosts/system/<domain_name>/conf/last_nginx.conf
        • => /var/www/vhosts/system/<domain_name>/conf/vhost_nginx.conf
      • => /etc/nginx/plesk.conf.d/forwarding/ <domain_name> .conf

占位符 <domain_name> 是为其生成配置的网站的域名。