• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Question Distinguishing www directory from the domain one

fbartolom

New Pleskian
I would like to direct accesses to www.domain and to domain to two different directories in Plesk. Yet when I try to add the www subdomain it says it is already there and in fact when I edit the 'domain' hosting setting a www is pre-printed before the editable domain name, differently from the other subdomain ones where the domain is pre-preinted instead. How may I set the thing to work the way I need?

Thanks, Fabrizio
 
i think it is a bit of an overshooting for just enabling a separate www directory. Are you sure there is no easier way? At any rate I found interesting the issue about error messages, I shall have to implement them to lead user to a custom error message I manually enabled on the old server.
 
Also
i think it is a bit of an overshooting for just enabling a separate www directory. Are you sure there is no easier way? At any rate I found interesting the issue about error messages, I shall have to implement them to lead user to a custom error message I manually enabled on the old server.
the editing should be done by editing php scripts, not configuration files, and tweaking factory code is a sure recipe for disaster. That is why inheritance was invented, for that matter.
 
At any rate I think I managed to modify the right piece of code:
PHP:
<?php foreach ($VAR->domain->webAliases AS $alias): ?>
    ServerAlias "<?php echo $alias->asciiName ?>"
<?php if (strcmp($alias, "taxiprofessional.net")) ?>
    ServerAlias "www.<?php echo $alias->asciiName ?>"
    <?php if ($OPT['ipAddress']->isIpV6()): ?>
    ServerAlias "ipv6.<?php echo $alias->asciiName ?>"
    <?php else: ?>
    ServerAlias "ipv4.<?php echo $alias->asciiName ?>"
    <?php endif; ?>
<?php endforeach; ?>
Yet when I connect to Plesk after having executed:
sudo /usr/local/psa/admin/sbin/httpdmng --reconfigure-domain taxiprofessional.net
I see no change altogether: it is still complaining:
Incorrect subdomain name www.taxiprofessional.net: the domain taxiprofessional.net already has the WWW prefix.
or
Error: Failed domain creation: Incorrect name www.taxiprofessional.net. This domain name already exists without the 'www' prefix.
I am unsure if my error is in the script or in the procedure.
 
Last edited:
Back
Top