• 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

Resolved Default domain and Let's encrypt

cirodev

New Pleskian
Server operating system version
Ubuntu 22.04.2 LTS
Plesk version and microupdate number
Plesk Obsidian Web Admin Edition 18.0.52 Update #3
Hi to all,

I just buyng new VPS on italian provider.

At this moment I don't have domain beacuse it is in trasfering status. In any case I would to test my site pointing to ip address of my VPS.
When I do it, server show me default plesk website.

I change, by ip address tool, default site but no change is applyed.

Other issue is present with let's encrypt configuration. When i go to configuration page I get the result show in image below, but SSL_it don't permit me to use let's encrypt.

Thanks

Best regards

1685266534478.png
 
Regarding the preview: If you do not have any virtual host configured that can be addressed by your domain name or a subdomain, you can hit the "preview" link to access the website through the domain preview URL. If your website is a Wordpress website, you also need to add these two lines to your wp-config.php file and enter your preview URL into these so that Wordpress knows that it now runs on the preview URL:
define( 'WP_HOME', '<preview URL>' );
define( 'WP_SITEURL', '<preview URL>'' );

Regarding Let's Encrypt: Please install the free "SSLIt" extension from extensions manager. Please be aware that for domain validated domains, certificates can only be issued if the domain is already accessible on your new server. As you mentioned the domain name is not yet pointing to it, you cannot create an SSL certificate for it yet.
 
Regarding the preview: If you do not have any virtual host configured that can be addressed by your domain name or a subdomain, you can hit the "preview" link to access the website through the domain preview URL. If your website is a Wordpress website, you also need to add these two lines to your wp-config.php file and enter your preview URL into these so that Wordpress knows that it now runs on the preview URL:
define( 'WP_HOME', '<preview URL>' );
define( 'WP_SITEURL', '<preview URL>'' );

Regarding Let's Encrypt: Please install the free "SSLIt" extension from extensions manager. Please be aware that for domain validated domains, certificates can only be issued if the domain is already accessible on your new server. As you mentioned the domain name is not yet pointing to it, you cannot create an SSL certificate for it yet.
Thanks for reply.

It's not word press site but normal php running on apache.
If i click preview I still see default plesk domain.
 
Is the preview domain configured correctly in Tools & Settings? Is the content of the website in the correct path (document root configured for the domain in Web Hosting Settings?
 
Let us try to resolve it step by step. I would like to ask you if you could please show what you have set in Tools & Settings > General Settings > Website Preview. Personally I think the ideal setting is radio button no. 2 "Quick Preview on an external domain name" with the hostname (the general domain name of your machine, e.g. where you login, with out the port. For example: myhostname.tld). Have you set it up that way?
 
Yes, i set 2th option and put inside it name that I give from hostname command

The value is myrealdomain.com
 
In that case the preview URL should be
https://<domain name>.<ip address with dashes>.hostname.tld/

It displays exactly the same content from your document root directory as if myrealdomain.com was active. You can verify it by looking into
/var/www/vhosts/system/myrealdomainname.com/conf/httpd.conf on your server. You will see the preview URL in the top lines of the virtual host entries.

Can you confirm that you are seeing the same?
 
The file is empty. Is auto generated.

This is result of command

hostname

xxxx.server-ip.plesk.page

domainname

myrealdomain
 
The file you are looking for seems to be

httpd_ip_default.conf

Inside it i have

<IfModule mod_ssl.c>

<VirtualHost myip:port >

as alias of server i found

"reladomain.ip-slasshed.domainname"

domainname is result of command
 
That is not the correct file. Domain configuration files must exist in /var/www/vhosts/system/conf. Could it be that your installation is using a "wrong" web server, e.g. some web server that was installed before Plesk and is still active? Normally the web server should be installed with Plesk, how was your installation done?
 
drwxr-x--- 2 root psaserv 4096 May 29 10:31 .
drwx--x--x 7 root psaserv 4096 May 26 20:59 ..
-rw------- 1 root www-data 349 May 29 10:30 httpd.conf
-rw------- 1 root www-data 349 May 29 10:30 httpd.conf.bak
-rw------- 1 root www-data 6677 May 29 10:30 httpd_ip_default.conf
-rw------- 1 root www-data 6677 May 29 10:30 httpd_ip_default.conf.bak
lrwxrwxrwx 1 root root 10 May 29 10:30 last_httpd.conf -> httpd.conf
lrwxrwxrwx 1 root root 21 May 29 10:31 last_ip_default.conf -> nginx_ip_default.conf
lrwxrwxrwx 1 root root 10 May 29 10:31 last_nginx.conf -> nginx.conf
-rw------- 1 root nginx 149 May 29 10:31 modsecurity_nginx.conf
-rw------- 1 root nginx 149 May 29 10:31 modsecurity_nginx.conf.bak
-rw------- 1 root nginx 149 May 29 10:31 nginx.conf
-rw------- 1 root nginx 149 May 29 10:31 nginx.conf.bak
-rw------- 1 root nginx 7371 May 29 10:31 nginx_ip_default.conf
-rw------- 1 root nginx 7371 May 29 10:31 nginx_ip_default.conf.bak
-rw-r--r-- 1 root root 2 May 29 06:29 stat_ttl.conf
 
Please go to Tools & Settings > IP Addresses and click on the IP address. A drawer appears where you can select a "default site". Please change that to "none". Afterwards please test if the preview now works.

Changing the default site to "none" will not remove the httpd_ip_default.conf file, but it won't use it any longer. For your website, please make sure that you really have the contents in the correct directory. That would be /var/www/vhosts/myrealdomainname.com/httpdocs.
 
What is the file system location of the content? It should be /var/www/vhosts/myrealdomainname.com/httpdocs OR - if you have set your individual document root - /var/www/vhosts/myrealdomainname.com/<your individual document root>.
 
httpsdocs may not be correct. What is set as the document root in "Hosting Settings" of that domain?
 
Back
Top