Question

Ubuntu+Apache2 Add subdomain.

Posted December 12, 2017 1.9k views
Apache

I use ubuntu and apace2. I installed wordpresses using one - click shell. Then I linked my domain to digitalocean. Subdomains are registered using digitalocean’s cname, which is connected to the main domain when accessing subdomains. I enat to this. When I connect the a.test.com, do not redirect test.com, It wants to connect to the set domain. What can I do?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

The WordPress one-click is configured with the WordPress installation as the default and any domain or subdomain requested that does not have it’s own separate apache virtualhost configuration will be directed to your default WordPress installation. With a static site there is more to do to ensure redirection but WordPress is configured by default to forward any request for a different domain to the base URL configured in your WordPress settings.

  • Hi,
    Have they any to change that once the WordPress one-click config is done?

    Thx,

    • The one-click image is simply a shortcut. You receive full root access to your droplet and the full ability to adjust any configuration related to WordPress, MySQL, Apache or any other service.

      • Thx for your answer.
        But, I already understand that.

        I’ve created a droplet with a WordPress One-Click installation and now I want to create a subdomain with another platform, such Laravel.

        I create the Virtual Host and the directories, but it still redirects to the main domain.

        How is possible?

        Thx,

Submit an Answer