Website preview is not working: Error occured. couldn't connect to host

Created:

2016-11-16 12:53:50 UTC

Modified:

2017-08-08 13:32:34 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Website preview is not working: Error occured. couldn't connect to host

Applicable to:

  • Plesk 12.0 for Linux

Symptoms

Website preview shows the following error:

Error occured. couldn't connect to host

Cause

httpd service is not properly configured or nginx service is removed.

Resolution

  1. Check what ports are used by Apache service:

    # httpd -S | grep port
    ...
    port 80 namevhost default (/etc/httpd/conf/plesk.conf.d/server.conf:79)
    ...
  2. Check settings of web services in Plesk database:

    # plesk db
    mysql> select * from ServiceNodeConfiguration where section in ('webProxy','webServer');
    +---------------+-----------+---------------------+-------+
    | serviceNodeId | section | name | value |
    +---------------+-----------+---------------------+-------+
    | 1 | webProxy | enabled | true |
    | 1 | webProxy | frontendPort | 80 |
    | 1 | webProxy | sslFrontendPort | 443 |
    | 1 | webServer | httpPort | 7080 |
    | 1 | webServer | httpsPort | 7081 |
    | 1 | webServer | webServerSettingsId | 1 |
    +---------------+-----------+---------------------+-------+
  3. If web proxy is enabled, make sure that nginx service is installed, up and running.

  4. If it is enabled, but it is required to disable it, execute the following command:
    # /usr/local/psa/admin/sbin/nginxmng -d
Have more questions? Submit a request
Please sign in to leave a comment.