• 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
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Help for Domain Alias

Frank.P

Regular Pleskian
I need help for that.

I have 2 domains.

example1.com
example2.com

I create a panel for example1.com with all directories like httpdoc,cgi,etc ...

I want to use a secundary domain (example2.com) for point to a especific directory at the same hosting.

This is something like Domain Alias, but not the same.

Why? , because I need example1.com and example2.com use the same include files and mdb files but the website are diferent.

How can I do that?
 
Could you please describe with more details why Domain aliases can't satisfy you if both domais will use the same database and files? If I correctly understood content of both sites will be absolutely the same. Right? What is the main goal of such domains behaviour if you don't want to use Domain Aliases?
 
I have a website and now I want the same but with other desing.

For example :

hosting_company.com
other_hosting.net

Both domain at the same account, because the DB is MDB FILE not MySql or MSSql and I need both domain have permission to read/write.

In Linux (Plesk) is easy, adding adicional domain and the change the root to new directory , but in Plesk only I see Domain Alias.

But Domain Alias take the same root directory of master domain.

I think ..... if I create a subdomain and then set a domain alias to the sub domain like this :

hosting_company.com > create subdomain other.hosting_company.com
other.hosting_company.com > create domain alias other_hosting.net

hosting_company.com (1 website with root httpdoc)
other_hosting.net (1 web site with root httpdoc\subdomain)

But this not work, because in plesk 9 not appear create domain alias to subdomain
 
Well. If I correctly understood the main goal is sharing one MDB database file between two different domains. Right? If it so, why you can't solve it with setting necessary permissions for this file?
 
I cannt change permissions from external domain to the main domain in plesk.

But I found the solution ... using rewrite module and using this :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Domain_Alias_Root" enabled="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="other_domain.net$" />
<add input="{URL}" negate="true" pattern="^/other_domain/.*$" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="/other_domain/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>


This change the root and not change the url.
 
Back
Top