Hello; Usually the root directory is located under : /var/www/clients/client1/web1 ( as an example ) It is possible to change it ? For example make the main directory on a subdirectory . The public_html is /var/www/clients/client1/web1/web , and I want to make it be : /var/www/clients/client1/web1/web/example . Is that possible ? Or I need to redirect via DNS only ?
I don't think so but default access via ssh is ../web1/home or something... This is possible via vhost, where I think you just need to customize it a bit.
You can customize the document root of a website through the Apache or Nginx Directives field on the options tab of the website.
@till Customizing it from Apache make it edited for all websites , isn't it ? I want to make it /var/www/html/videos only for 1 of my sites . Is that possible ? In case of yes , could you provide the command line to edit it ?
No, I'm not talking about altering the master file. I suggested that you add a new DocumentRoot directive in the Apache Directives field on the options tab of this one website.
@till You mean like Vhost ? Please give me the command to edit it . I will google more , just provide the command line please
@till Ok , I see what you're talking about . You mean the Snippets . But how do I add what I want there ? I can see only 2 variables
I'm not talking about snippets and not about editing any files or vhosts. On the options tab of the website, there is a text field named apache directives and there you add a new DocumentRoot directive. e.g.: Code: DocumentRoot /var/www/clients/client1/web1/web/example
Should be looking like this ? Or I do need to add at the start ''DocumentRoot'' ? And what is Code: ? What code should I add there ?
No. I posted above what you should add. Again: DocumentRoot /var/www/clients/client1/web1/web/example
You write there apache directives. https://httpd.apache.org/docs/current/mod/directives.html ISPConfig Manual 3.1 has some info on page 140.
Just an extra note for nginx where in nginx directive you can use: ##subroot public/html ## Ref: https://git.ispconfig.org/ispconfig/ispconfig3/merge_requests/698
Hello, I'm trying to modify the document root too. I added the following line in the apache directive field : {DOCROOT} /var/www/clients/client1/web1/web/html but it does not work.... What I'm missing ?.... Thanks David
You must add: Code: DocumentRoot {DOCROOT_CLIENT}/html or alternatively: Code: DocumentRoot /var/www/clients/client1/web1/web/html See posts #8 and #10 in this thread.
What should this be for NGINX root ? And I don't mean a sub of the existing one, but something like docroot /var/lib/roundcube/public_html ?