Help properly setting up subdomain (cloud.domain.com)

Steps to reproduce

  1. Attempt to connect using the url: 'https://cloud.domain.com'

Expected behaviour

when the url: 'cloud.domain.com' is requested, display the ownCloud panel similarly to how domain.com/owncloud operates. Display the url: "https://cloud.domain.com/" hide "index.php"
Example: "https://cloud.domain.com/settings/"

Actual behaviour

When the subdomain 'cloud.domain.com' is requested, the website is either not found or has an SSL error. domain.com/owncloud works perfectly; however, I would like to move to the subdomain: 'cloud' and slowly, but surely shorten the url for ownCloud services.

Server configuration

I'm using a shred web-server provided by InterServer in tandem with CloudFlare:

Operating system: Linux

Web server: Apache 2.4.29

Database: MySQL 10.1.32-MariaDB

PHP version: 5.6.34

ownCloud version: 10.0.7.2

Updated from an older ownCloud or fresh install: Fresh Install

Where did you install ownCloud from: ownCloud Web Installer (official website)

Signing status (ownCloud 9.0 and above): No Errors

The content of config/config.php:

        "instanceid": "ocwri8nq6q9k",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "domain.com",
            "cloud.domain.com"
        ],
        "datadirectory": "\/home\/user\/public_html\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/domain.com\/owncloud",
        "dbtype": "mysql",
        "version": "10.0.7.2",
        "dbname": "chillser_owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_smtpmode": "smtp",
        "filelocking.enabled": true,
        "htaccess.RewriteBase": "\/owncloud"

Full Report: https://pastebin.com/s9MFuZdk

List of activated apps:

Admin Config Report
Deleted files
Federation
Provisioning API
Share Files
Update notification
Versions
Collaborative tags
Comments
First run wizard
Mail Template Editor
Market
Notifications
Video Player

Are you using external storage, if yes which one: No

Are you using encryption: Not yet (No)

Are you using an external user-backend, if yes which one: No

I've been researching this for days and all other related threads I've been able to find are either dead with no solution or the solution doesn't mean anything to me. All I would like is for the ownCloud services installed on my web-server to be redirected to the subdomain 'cloud' rather than a directory in the url. the main directory of the url is a website.

I have experimented with a records and cname records in CloudFlare, but can't find the right configuration. What is the correct dns record for cloud.domain.com?

I can't find any guides or information regarding running ownCloud in a subdomain. What is the correct configuration for doing this? Is there a guide?

Here are some similar threads:
apache-conf-setup-to-serve-subdomain-site-alongside-owncloud-deploy
https://forum.owncloud.org/viewtopic.php?t=19120
https://central.owncloud.org/t/subdomain-and-domain-points-to-owncloud/1042

Maybe you're looking into the wrong direction? :slight_smile:

ownCloud is just a bunch of PHP files and i think things like "SSL error" and "not found" is probably something where you would need to find some one with the knowledge about the Apache and CloudFlare combination.

The only two things i have seen in your config.php are "overwrite.cli.url" and "htaccess.RewriteBase" which seems to be about the "/owncloud" path. Maybe you can find some information about those two settings in the ownCloud documentation at https://doc.owncloud.org/server/latest/admin_manual/ ?

You are going to need a different SSL certificate for cloud.domain.com.

The certificate you currently got is for domain.com, which is why you are seeing the SSL error.

You could protect both domains with a wildcard certificate.

So apparently you need to create subdomains in cPanel...

That's cool to know now.