Author Topic: Create New account and specify a folder other than "/public_html" ?  (Read 13599 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How, when creating a new account, specify the folder in which the files will be stored?
When adding a new domain to an existing account, I can specify the folder name.
When you create a new account, the folder for the domain is assigned automatically as "/public_html"

Offline
**
Re: Create New account and specify a folder other than "/public_html" ?
« Reply #1 on: April 23, 2017, 08:03:17 PM »
How, when creating a new account, specify the folder in which the files will be stored?
When adding a new domain to an existing account, I can specify the folder name.
When you create a new account, the folder for the domain is assigned automatically as "/public_html"

Can modificated that in template for other folder.

Automatic created " /home/User/public_html/

Offline
*
Re: Create New account and specify a folder other than "/public_html" ?
« Reply #2 on: April 23, 2017, 08:38:07 PM »
Can modificated that in template
Thank you!
Apache settings -> vHosts template

But, in general, IMHO, it is more correct to make it possible to select the folder to install.

Offline
*
Re: Create New account and specify a folder other than "/public_html" ?
« Reply #3 on: April 27, 2017, 08:52:26 PM »
Ohohoh.....
Apache vHosts Template $ edit to "Apache Domain Virtual Host tpl:":
Code: [Select]
# vhost_start %domain_name%
<VirtualHost %domain_ip%:%domain_port%>
ServerName %domain_name%
ServerAlias www.%domain_name%
ServerAdmin %admin_email%
DocumentRoot "%homedir%/%username%/vhosts/%domain_name%/httpdocs"
ScriptAlias /cgi-bin/ "%homedir%/%username%/vhosts/%domain_name%/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/%username%/%domain_name%/*.conf

<IfModule mod_suexec.c>
        SuexecUserGroup %username% %username%
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup %username% %username%
        suPHP_ConfigPath /home/%username%
</IfModule>

<Directory "%homedir%/%username%/vhosts/%domain_name%/httpdocs">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end %domain_name%

- I run: "Rebuild Virtual Hosts"
- I add new user:
Code: [Select]
Changing password for user asd.
passwd: all authentication tokens updated successfully.
Changing shell for asd.
Shell changed.

--> Template exist. Copying template files to /home/asd/public_html/


# vhost_start qw
<VirtualHost 185.123.192.102:8181>
ServerName qw
ServerAlias www.qw
ServerAdmin igor@kentavr.com.ru
DocumentRoot "/home/asd/vhosts/qw/httpdocs"
ScriptAlias /cgi-bin/ "/home/asd/vhosts/qw/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/asd/qw/*.conf

<IfModule mod_suexec.c>
        SuexecUserGroup asd asd
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup asd asd
        suPHP_ConfigPath /home/asd
</IfModule>

<Directory "/home/asd/vhosts/qw/httpdocs">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end qw


Account Details
========================================
Server IP: 185.123.192.102
Web Panel Login:
Domain: qw
Username: asd
Password: gKdH5W0m
Admin Email: igor@kentavr.com.ru

Panel URL: http://185.123.192.102:2030

NameServers:
ns1.centos-webpanel.com
ns2.centos-webpanel.com

Check Account Create Details
--> Checking if "/home/asd/public_html" folder if exist: [YES]

Reloading httpd server:

Reloading DNS zones

server reload successful
The virtual host settings point correctly, but the directories are not created correctly!  :'(