News:

SMF - Just Installed!

Main Menu

Recent posts

#21
Webserver / Some pages of a website on Ple...
Last post by Suhitha - Sep 30, 2025, 05:29 AM
Question: Some pages of a website on Plesk for Windows return 403


Applicable to:

  • Plesk for Windows



Symptoms

  • Some content (e.g. images) of the website example.com hosted in Plesk is not shown correctly
  • In the network tab of a web browser development console (F12) these elements have response code 403.
  • The detailed error code is 403.502 is shown in the failed requests with enabled Failed Requests Tracing via Domains > example.com > Failed Requests Tracing with the following parameters:
     
  •       Status codes - 403
  •       Provider - WWW Server


Cause

Code 403.502 - Too many requests from the same client IP; Dynamic IP Restriction limit reached.


Resolution

1.Log in to Plesk

2.Navigate to Domains > example.com > IIS Settings

3.Either disable the option Deny IP addresses based on the number of requests over a period of time or adjust the Maximum number of requests and/or Time period:

#22
Webserver / Website running on Plesk has a...
Last post by Suhitha - Sep 30, 2025, 05:22 AM
    Question: Website running on Plesk has a broken layout when opening via HTTPS: blocked:mixed-content


    Symptoms

    • Website has a broken layout (CSS) when opening via HTTPS - some elements in the browser console (F12) contain status blocked:mixed-content while their headers contain strict-origin-when-cross-origin

    [/list]

    • Errors similar to this appear in the browser console:

    Mixed Content: The page at 'https://example.com' was loaded over HTTPS, but requested an insecure stylesheet 'http://example.com/css/StyleSheet.css'. This request has been blocked; the content must be served over HTTPS.
    • CSS styles can be accessed directly using HTTPS
    • When accessed using HTTP the website works as expected


    Cause

    The website uses HTTP links inside its code. Since the website is accessed through HTTPS this causes what is known as "mixed content", which is not allowed by browsers as it is a bad practice for security.


    Resolution

    Adjust the website code or configure the following Content-Security-Policy header to force web server to upgrade HTTP requests to HTTPS.

    1.Log into Plesk

    2.Go to Domains > example.com > Hosting & DNS > Apache & nginx

    Insert the following rules into Additional nginx directives OR Additional Apache directives sections:

    • For nginx:

    add_header Content-Security-Policy upgrade-insecure-requests;
    • For Apache:

    Header always set Content-Security-Policy "upgrade-insecure-requests;"

    #23
    Webserver / How can I switch the MPM mode ...
    Last post by Suhitha - Sep 30, 2025, 05:16 AM
    Applicable to:

    • Plesk for Linux


    Question

    • How can I switch the MPM mode for the Apache web server in Plesk?
    • Am I able to switch the used MPM mode for Apache in Plesk?

    Answer


    Via Plesk UI

    You can switch the MPM (Multi-Processing Module) mode in Plesk by following these steps:

    1. Log into Plesk

    2. Go to Tools & Settings > Apache & Nginx Settings

    3. Select the desired MPM mode from the ones available in the dropdown



    4. Scroll down and press Apply


    Via CLI

    1.Connect to the server via SSH

    2.Run the following command with either prefork or event:

    # plesk bin optimization_settings --set-mpm prefork

    Additional Information

    What are the differences between MPM Event and MPM Prefork in Plesk?

    optimization_settings: Apache Modules Management
    #24
    Webserver / Website on Plesk shows: cURL e...
    Last post by Suhitha - Sep 30, 2025, 03:45 AM
    Question: Website on Plesk shows: cURL error (77): Problem with the SSL CA cert


    Applicable to:

    • Plesk for Linux
    • Plesk for Windows



    Symptoms

    • A website or PHP scripts show the following error:

    cURL error (77): Problem with the SSL CA cert (path access rights)cURL error (77): Problem with the SSL CA cert (path access rights)
    Error : "error setting certificate verify locations: CAfile: C:\Program Files (x86)\Plesk\Additional\PHPSettings\cacert.pem CApath: none"
    cURL error 77: error setting certificate verify locations: CAfile: /etc/ssl/certs/cacert.pem CApath: /etc/ssl/certs
    • On Plesk for Windows the Extensions menu may show the following error when trying to open it:
    error setting certificate verify locations: CAfile: C:\Program Files (x86)\Plesk\admin\conf\cacert.pem CApath: none


    Cause

    PHP cURL uses an outdated set of root certificates to verify server certificates.


    Resolution

                                   Solution 1 - Using Plesk GUI

    1.Log in to Plesk.

    2.Install Panel.ini Editor extension: Extensions > Server Tools section > Panel.ini Editor.

    3.Go to Extensions > My Extensions > Panel.ini Editor (Go To Extension) > Editor.

    4.Add records below to the editor and Save changes:

    [php]
    curlCertificatesUrl="http://curl.haxx.se/ca/cacert.pem"

    5.Wait until Daily task is executed (It is executed once a day).

    6.Go to Domains > example.com > PHP Settings and add the line below into Additional configuration directives. Replace path to cacert.pem with your own path.

    [color=brown]curl.cainfo="C:\Program Files (x86)\Plesk\Additional\PHPSettings\cacert.pem"[/color]
    If it is required to apply the changes for all the domains using a particular PHP version go to Tools & Settings > PHP Settings> %PHP_version%, click on php.ini tab and add the following line at the end of file:

    curl.cainfo="/etc/ssl/certs/cacert.pem"

                                      Solution 2 for Windows

    1.Log in to the server via RDP.

    2.Download the cacert.pem file from the main curl website http://curl.haxx.se/ca/cacert.pem.

    3.Open %plesk_dir%admin\conf\panel.ini file (create it from panel.ini.sample if it doesn't exist)

    Note: %plesk_dir% by default is C:\Program Files (x86)\Plesk\

    4.Add below directive to panel.ini.

    [php]
    curlCertificatesUrl="http://curl.haxx.se/ca/cacert.pem

    5.Place downloaded cacert.pem to %plesk_dir%Additional\PHPSettings\ directory.

    6.Wait until Daily task is executed (It is executed once a day).


                                    Solution 2 for Linux

    1.Connect to the server via SSH

    2.Download the CA certificate store from the official cURL website and move it to the directory /etc/ssl/certs/:

    # wget https://curl.haxx.se/ca/cacert.pem && mv cacert.pem /etc/ssl/certs/
    3.Log into Plesk.

    4.Go to Tools & Settings > PHP Settings > %PHP version% > php.ini.

    5.Add the following line into the end of the file:

    curl.cainfo="/etc/ssl/certs/cacert.pem"
    6.Click OK to save the file
    #25
    Webserver / Apache is failing to start on ...
    Last post by Suhitha - Sep 30, 2025, 03:32 AM
    Question: Apache is failing to start on a Plesk server: "Cannot load /usr/lib/apache2/modules/libphp7.4.so into server"


    Applicable to:

    Plesk for Linux


    Symptoms

    • The Apache web server is failing to start on a Plesk server
    • Last lines from CLI command journalctl -xeu apache2 are:

    Aug 31 10:09:44 server systemd[1]: Starting The Apache HTTP Server...
    Aug 31 10:09:44 server apachectl[953]: apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.4.load: Cannot load /usr/lib/apache2/modules/libphp7.4.so into server: /usr/lib/apache2/modules/libphp7.4.so: cannot open shared object file: No such file or directory
    Aug 31 10:09:44 server apachectl[920]: Action 'start' failed.
    Aug 31 10:09:44 server apachectl[920]: The Apache error log may have more information.
    Aug 31 10:09:44 server systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Aug 31 10:09:44 serverr systemd[1]: apache2.service: Failed with result 'exit-code'.
    Aug 31 10:09:44 server systemd[1]: Failed to start The Apache HTTP Server.


    Cause

    Apache is trying to load PHP 7.4 provided by OS vendor which is not installed on the server.


    Resolution

    Move the following files:

    # mv /etc/apache2/mods-enabled/php7.2.load /root/php7.4.load

    # mv /etc/apache2/mods-enabled/php7.4.conf /root/php7.4.conf

    Restart the Apache service:

    # systemctl restart apache2.service
    #26
    Webserver / Error during the reconfigurati...
    Last post by Suhitha - Sep 30, 2025, 03:26 AM
    Question: Error during the reconfiguration of the Apache files in Plesk: Invalid command 'RequestHeader', perhaps misspelled or defined by a module not included in the server configuration


    Symptoms

    • Execution of the plesk repair web command returns the next error message:

    AH00526: Syntax error on line 117 of /etc/apache2/plesk.conf.d/server.conf:
    Invalid command 'RequestHeader', perhaps misspelled or defined by a module not included in the server configuration

    Cause

    All Apache modules are disabled.


    Resolution

    1.Log into Plesk

    2.Go to Tools & Settings > Apache Web Server

    3.Enable modules as on the screenshot below and press the OK button to apply the changes:



    4.Log into the server via SSH

    5.Execute the command below to repair the Apache configuration:

    # plesk repair web
    #27
    Webserver / Website becomes unavailable af...
    Last post by Suhitha - Sep 30, 2025, 03:12 AM
    Question: Website becomes unavailable after switching to FPM application served by Apache


    Symptoms

    • Website becomes unavailable after switching to FPM application served by Apache
    • When the PHP version to another one and then back to the initial PHP version the website works again
    • In the corresponding /var/log/plesk-phpXX-fpm/error.log the following errors appear despite the fact that the service is running and the website is accessible:

    ERROR: Another FPM instance seems to already listen on /var/www/vhosts/system/example.com/php-fpm.sock
    ERROR: Another FPM instance seems to already listen on /var/www/vhosts/system/example.com/php-fpm.sock
    ERROR: Another FPM instance seems to already listen on /var/www/vhosts/system/example.com/php-fpm.sock
    ERROR: Another FPM instance seems to already listen on /var/www/vhosts/system/example.com/php-fpm.sock


    Cause

    The php-fpm.sock file of the affected domain is corrupted


    Resolution

    Delete the php-fpm.sock file, it will be recreated automatically:

    1.Connect to the server via SSH

    2.Execute the following command:

    # rm -rf /var/www/vhosts/system/example.com/php-fpm.sock
    #28
    Webserver / How can I make nginx proxy req...
    Last post by Suhitha - Sep 30, 2025, 03:02 AM
    Question

    How can I enable Proxy mode (make nginx act as a reverse proxy) for a website in Plesk?


    Answer

    In order to make nginx proxy requests to Apache for a Plesk domain, you should follow these steps:

    1. Log into Plesk

    2. Go to Domains > example.com > Hosting & DNS > Apache & nginx

    3. Scroll down to the nginx settings section and check the box for Proxy mode

    4. Press Apply to save the changes


    #29
    Webserver / Enhancing Security with Apache...
    Last post by Suhitha - Sep 30, 2025, 02:59 AM
    Question

    How can I use the new feature in Plesk 18.0.56 that allows Apache Web Server to listen on localhost on ports 7080 and 7081?


    Answer

    In Plesk 18.0.56, a new security feature (PPP-43250) was introduced that restricts the Apache web server to listening only on localhost ports 7080 and 7081, thereby increasing server security. This feature is particularly active when Apache is running with nginx as a reverse proxy, listening only on the loopback IP address.

    The feature is manipulated using the CLI command plesk bin apache --listen-on-localhost <true|false>, which enables or disables Apache's localhost mode. For new Plesk installations, this mode is enabled by default. However, for Plesk upgrades, localhost mode remains disabled by default.

    It's important to note that existing custom hosting templates may require adjustments to function properly in localhost mode, depending on the modifications made to the template. This is an important consideration to ensure the smooth operation of your server configurations.
    #30
    Others / How to list all domain names v...
    Last post by senthil - Sep 29, 2025, 08:24 AM
    Question

    How to list all domain names via the command line interface?

    Answer

    One can use the following command to list all domain names:
    # plesk bin site --list
    Alternatively, one can extract those via the database with this command:
    # plesk db "SELECT name FROM domains;"
    In order for the list to include all domain aliases, please use the command below instead:
    # plesk db "SELECT name FROM domains UNION SELECT name FROM domain_aliases"