<p>Are these two sites exactly the same, and this is just an alias?  If so, you don't need any configuration, just point the DNS to the right place, and it'll work.</p>

<p>If not, can you provide more details on what you're trying to achieve?</p>

CC BY-SA 3.0
2015-12-12T17:54:50.473Z
Bingo. Sounds like a vhost/configuration issue.
RitterKnight
CC BY-SA 3.0
2015-12-14T02:37:35.293Z
Yes this is two are exactly the same and not an alias. I would have to find out exactly what's going on in the setup but basically the one subdomain is an internal (intranet) site and the other is behind a single sign on open to external connections.
julzmon
CC BY-SA 3.0
2015-12-11T23:06:03.740Z
2015-12-11T23:06:03.740Z
andrew.welch
<p>I have to set a the same site on two different subdomains. I have the two subdomains included in the config.php. But that doesn't seem to work. Is there any other configurations I need to set?</p>

<pre><code>// internal
'sub1.website.com' =&gt; array(
    'overridePhpSessionLocation' =&gt; true,
    'environmentVariables' =&gt; array(
        'siteUrl' =&gt; 'https://sub1.website.com/',
        'fileSystemPath' =&gt; '/var/www/html/'
    )
),
// external
'sub2.website.com' =&gt; array(
    'overridePhpSessionLocation' =&gt; true,
    'environmentVariables' =&gt; array(
        'siteUrl' =&gt; 'https://sub2.website.com/',
        'fileSystemPath' =&gt; '/var/www/html/'
    )
),
</code></pre>

<config><subdomain>
How do I set up same site to use two different subdomains?
# How do I set up same site to use two different subdomains?

(Asked by: username_0 on 2015-12-11)

I have to set a the same site on two different subdomains. I have the two subdomains included in the config.php. But that doesn't seem to work. Is there any other configurations I need to set?
// internal
'sub1.website.com' => array(
    'overridePhpSessionLocation' => true,
    'environmentVariables' => array(
        'siteUrl' => 'https://sub1.website.com/',
        'fileSystemPath' => '/var/www/html/'
    )
),
// external
'sub2.website.com' => array(
    'overridePhpSessionLocation' => true,
    'environmentVariables' => array(
        'siteUrl' => 'https://sub2.website.com/',
        'fileSystemPath' => '/var/www/html/'
    )
),

**Tags:** config, subdomain


---

## 1 answers

### Answer by username_1 on 2015-12-11. Score: 1

Are these two sites exactly the same, and this is just an alias? If so, you don't need any configuration, just point the DNS to the right place, and it'll work.

If not, can you provide more details on what you're trying to achieve?

> **Comments:**
> **username_2**: Bingo. Sounds like a vhost/configuration issue.  
> **username_0**: Yes this is two are exactly the same and not an alias. I would have to find out exactly what's going on in the setup but basically the one subdomain is an internal (intranet) site and the other is behind a single sign on open to external connections.  

---

