[Resolved] oops! vhost subdomain in site root?

Discussion in 'Installation/Configuration' started by TonyG, Dec 22, 2020.

  1. TonyG

    TonyG Active Member

    I just created a vhost subdomain. I left the "web folder" field empty, thinking it would probably default in the name of the subdomain. That is, I expected foo.domain.tld to be placed in /var/www/clients/client_1/site_15/foo/. There is no foo folder there. Somehow (before I noticed this) I was able to create a LE cert. I have no idea where the .well-known folder was created or where the default index page was stored.

    Once we create a subdomain we cannot change the folder, so it's empty now and cannot be changed to foo.

    I am really concerned that deleting this subdomain will do damage to the site root. Please help with removing this properly. I believe that would require a database edit, some file movement, and an edit of the foo.vhost file.
    I got a snapshot of the system right before this. I can reluctantly restore the server if required.
    Thanks!
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    The way I'd do is by deleting the vhost subdomain I created in ISPConfig GUI, like I'd do to a website.
     
  3. TonyG

    TonyG Active Member

    but if the vhost subdomain is pointing to the site root, isn't there a possibility that some of the site root will be removed?
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    What do you have for the document root in the vhost file?
    I suspect not, but I'll try to rest it tomorrow.

    You can edit the database, in the web_domain table there is a column I forget the name of, maybe web_root, web_folder or document_root. Just change that to what you want, then edit the subdomain in the ui and change something/save (then change back if needed).
     
  5. TonyG

    TonyG Active Member

    Thanks. To test:
    Backup the clientX/site_y folder.
    Create a vhost subdomain ... do not enter a web folder name ... save.
    Visit the site. It's there.
    (optional) Add LE cert. HTTPS works.
    So where are the files?
    Delete the site.
    What happens?

    I can work with the database tomorrow as noted.
     
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    There are two places, the other one is supposedly at /var/www/foo.domain.tld/web.

    In my experience, deleting in ISPConfig GUI will only delete the folder in that two places, never others.

    The first path you mentioned somehow confuses me but you can always list then to verify yourselves e.g. ls /var/www/client*/*/web.

    I found it hard to believe that you can use / as your website folder via ISPConfig GUI at all but I could always be wrong.
     
  7. TonyG

    TonyG Active Member

    I created three issues from this for consideration, and I'm OK with moving on. Thanks all.
     
    Last edited: Dec 23, 2020

Share This Page