• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

How DO I Set Root Directory For Subdomain?

S

Superman859

Guest
How Do I Mod_Rewrite For Subdomain?

I'm switching servers. The old server used a different file structure and had a generic control panel. The structure was something like

public_html/folders

where folders could be whatever. For a subdomain, you could create a subdomain and then specify the root directory. For example, I have www.site.com/phpBB2 as a directory for forums. I created forums.site.com and set the root as public_html/phpBB2.

Now, I'm moving the site to Plesk. My code is all written for the old file structure. With Plesk, subdomains by default end up in subdomains/subname/httpdocs.

If I were to take all the files from phpBB2 and simply put them in subdomains/forums/httpdocs, I'd have some issues with my php code.

What I would like to do is still use forums.site.com, but get that to point to httpdocs/phpBB2 rather than subdomains/forums/httpdocs. If I can do that, then I should be able to transfer everything with ease and not worry about breaking the code.

Any ideas?

Edit: I've been searching around and it seems like the best option is with a mod_rewrite. I'm not too familiar with those, so it's difficult to write one on my own from looking at other examples.

An example for one subdomain (say forums.site.com pointing to httpdocs/phpBB2 ) should be enough to allow me to create my own vhost.conf file for the other subdomains. By the way, I can just create vhost.conf if it's not present, right? All I have in conf/ is httpd.include which I'm not supposed to edit.
 
Back
Top