• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

a subdomains half-way created and ignored by Apache

Miguel_Tellería

Basic Pleskian
Dear all,

Since a week ago or so, in one of our Plesk 12.0.18 / Centos 6.6 servers, when we create subdomains the process seems to stop half-way without being finished.

To reproduce the error:
  • Select a subscription (e.g. example.com) and go to "Domains and subdomains"
  • Select "add new subdomain" and enter a value (e.g. new.example.com). The directory will live in parallel to httpdocs
  • Click Accept
Expected result:
  • The subdomain should be created: Filesystem diirectory with default contents, DNS entry, Apache VirtualHost, etc.

Actual result:
After several minutes Plesk responds with Internal Errror (in a red area in the panel).
Things done right:
  • The file space in parallels with httpdocs is created fine with the default site.
  • DNS entries are created under /var/named/chroot infrastructure.
  • The subdomain menu appears fine in the Plesk panel.
Things wrong/missing:
  • The filesystem directory is not mapped by Apache. Even after changing its contents the default server templeate appears in the browser, (all precautions taken, apache restart, browser in private session and different browsers).
Log info:
- /var/log/sw-cp-server/error_log says:
2015/05/27 18:17:45 [error] 28890#0: *1828 readv() failed (104: Connection reset by peer) while reading upstream, client: nnn.nnn.nnn.nnn, server: , request: "POST /smb/web/add-subdomain HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "<hostname>:8443", referrer: "https://<host>:8443/smb/web/add-subdomain"

- /var/log/httpd/access_log records the access with 200 OK codes although I don't find them in neither subscription logs under /var/www/vhost/system/*/logs/access_log
nnn.nnn.nnn.nnn - - [27/May/2015:18:38:35 +0200] "GET <deleted_content_in_the_subdomain_directory> HTTP/1.1" 200 14036 "http://<new_subdomain>" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0

I don't find the Apache VirtualHost .conf files for subdomains, any ideas where can I look for them up?

Thanks in advance for any help.
 
We are still fighting against this on our side. We have one more indication:

The files:
/var/www/vhosts/system/<subdomain>.domain.com/conf/httpd.conf are missing (and so are the links from /etc/httpd/conf/plesk.conf.d/vhosts)

Comparing our case with other Plesk installations that we have (same Plesk version and OS) we find that the /var/www/vhosts/system/<subdomain>.domain.com is incomplete.

Our case (bad):
/var/www/vhosts/system/subdomain.subscription.com/
/var/www/vhosts/system/subdomain.subscription.com/statistics
/var/www/vhosts/system/subdomain.subscription.com/statistics/webstat-ssl
/var/www/vhosts/system/subdomain.subscription.com/statistics/webstat-ssl/index.html
/var/www/vhosts/system/subdomain.subscription.com/statistics/anon_ftpstat
/var/www/vhosts/system/subdomain.subscription.com/statistics/anon_ftpstat/index.html
/var/www/vhosts/system/subdomain.subscription.com/statistics/ftpstat
/var/www/vhosts/system/subdomain.subscription.com/statistics/ftpstat/index.html
/var/www/vhosts/system/subdomain.subscription.com/statistics/webstat
/var/www/vhosts/system/subdomain.subscription.com/statistics/webstat/index.html
/var/www/vhosts/system/subdomain.subscription.com/statistics/logs
/var/www/vhosts/system/subdomain.subscription.com/pd
/var/www/vhosts/system/subdomain.subscription.com/pd/d..httpdocs@plesk-stat
/var/www/vhosts/system/subdomain.subscription.com/conf
/var/www/vhosts/system/subdomain.subscription.com/conf/stat_ttl.conf
/var/www/vhosts/system/subdomain.subscription.com/etc
/var/www/vhosts/system/subdomain.subscription.com/etc/php.ini
/var/www/vhosts/system/subdomain.subscription.com/logs
/var/www/vhosts/system/subdomain.subscription.com/logs/error_log

The bood case
/var/www/vhosts/system/subdomain.subscription.com/
/var/www/vhosts/system/subdomain.subscription.com/conf
/var/www/vhosts/system/subdomain.subscription.com/conf/stat_ttl.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/13896916970.85201300_httpd.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/httpd.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/last_nginx.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/13898883580.73346100_nginx.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/httpd.conf.bak
/var/www/vhosts/system/subdomain.subscription.com/conf/13896916390.03590000_nginx.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/13896916370.98541000_httpd.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/14018053230.62324400_nginx.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/14018941230.41097700_httpd.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/13898883590.20875500_httpd.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/last_httpd.conf
/var/www/vhosts/system/subdomain.subscription.com/conf/13896916980.38828400_nginx.conf

/var/www/vhosts/system/subdomain.subscription.com/statistics
/var/www/vhosts/system/subdomain.subscription.com/statistics/ftpstat
/var/www/vhosts/system/subdomain.subscription.com/statistics/webstat-ssl
/var/www/vhosts/system/subdomain.subscription.com/statistics/anon_ftpstat
/var/www/vhosts/system/subdomain.subscription.com/statistics/logs
/var/www/vhosts/system/subdomain.subscription.com/statistics/webstat
/var/www/vhosts/system/subdomain.subscription.com/statistics/webstat/[...]
/var/www/vhosts/system/subdomain.subscription.com/pd
/var/www/vhosts/system/subdomain.subscription.com/pd/d..httpdocs@plesk-stat
/var/www/vhosts/system/subdomain.subscription.com/logs
/var/www/vhosts/system/subdomain.subscription.com/logs/[...]
/var/www/vhosts/system/subdomain.subscription.com/etc
/var/www/vhosts/system/subdomain.subscription.com/etc/php.ini

We can fix it manually but the problem still persists when we create new domains and we have many subdomains to fix.

Is there a way to automatically generate those conf files? (with a previous backup in case).

Regards,

Miguel
 
Hi Miguel_Tellería,
to regenerate conf files for a domain and all domains are as follows...

Single domain
Code:
# /usr/local/psa/admin/bin/httpdmng --reconfigure-domain example.com

All domains
Code:
# /usr/local/psa/admin/bin/httpdmng --reconfigure-all


I hope that helps.
Kind regards

Lloyd
 
All domains
Code:
# /usr/local/psa/admin/bin/httpdmng --reconfigure-all

This command will as well recreate all depending apache ( and if used, the ones for nginx as well ) server configurations, located at "/etc/httpd/conf/plesk.conf.d/" ( and if nginx is used = "/etc/nginx/plesk.conf.d" ).


Please have as well a look at the "Webserver Configurations Troubleshooter" ( Tools & Settings > Updates & Upgrades > Add/remove components => "Additional Plesk Extensions" ), which is a very usefull tool for the Plesk Control Panel. You may read more about this Plesk Extension at:

 
Hi Lloyid:mcse and UFHH01,

Your advice was very useful. After some precautions and previous checks I ended up launching
/usr/local/psa/admin/bin/httpdmng --reconfigure-all and the sudomains started working again!!.

I also checked out the "Webserver Configuration Troubleshooter" and it displayed what it seems to be some orphaned db entries for previously deleted domains. All this reveals that the machine has been doing some tasks of virtualhost maintenance only partially without completing them.

This may be caused by a high load and delay in the disk access but this will be the subject of a future post.

Regards,

Miguel
 
Back
Top