• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Making a subdomain serve files from same directory as main domain

Daniel_Wardin

New Pleskian
Hi,

I'm setting up a SAAS service which is built on top of Laravel. To put it simply the service itself knows whether its being called from a sub.example.com or just example.com and serves a correct response accordingly. So going to sub.example.com will use the same index.php file as example.com but the routes and controllers within the application will provide a different response. sub.example.com will show a tenant login page where as example.com will show a new tenant subscription page or something else.

So when someone new subscribes I add a new entry to the database with a subdomain name for them and when a request comes from that subdomain and they are logged in it will show them their information. Easy right.

There is a problem though with setting it up with Plesk. When I add a wildcard subdomain, it will look for /subdomains/sub/ for the files which is a bit problematic since I want it to serve the files from the same place as the domain example.com.

Is there a way to configure that so that regardless of the subdomain it will try and serve the exact same content as my main domain?
 
you can choose folder for your subdomain and change to original.
But currently I get ERR_NAME_NOT_RESOLVED for this trying to do such for Opencart multistore
 
Back
Top