stefanpejcic / OpenPanel

A highly customizable web hosting control panel built with Docker 🐳
https://openpanel.com
216 stars 33 forks source link

Editing vhost files gives the error #218

Closed caesarmind closed 1 month ago

caesarmind commented 1 month ago

OpenPanel version(s) affected

0.3.2

What OS are you using?

Ubuntu

Description

I edited virtual host file and got error:

Screenshot 2024-10-18 at 15 46 25

Also, it would be nice if you would suggest proper way to change document root. after I edited vhost file on domains page where we have list of domains, document root hasn't updated

How to reproduce

Open vhost file of any domain and change DocumentRoot directory

Possible Solution

No response

Additional Context

No response

stefanpejcic commented 1 month ago

Hello,

The user can:

  1. Create a new directory (move the existing document root).
  2. Create a symlink from the old document root to the new one.

This approach ensures that everything expecting the current format from the panel interface will continue to work, as /home/{username}/{domain}/ is hardcoded.

I'll leave the issue open for future consideration when we can allocate resources for a proper rewrite.

caesarmind commented 1 month ago

still, you need to polish error message and let users know that there are some restriction or it feels like it doesn't work.

caesarmind commented 1 month ago

also please specify what's the way of creating symllinsk via UI?

stefanpejcic commented 1 month ago

There is no option for creating symlink via UI - only from terminal

2024-10-21_11-06

caesarmind commented 1 month ago

/home/{username}/{domain}/

I am not talking about this format.

/home/{username}/{domain}/ + public = /home/{username}/{domain}/public - I need to achieve this. I already have done it with one websites and works fine, just still getting error during editing file