Hello Dixie,
This is easy enough to do permanently yourself. I did it yesterday.
Sorry I forgot that you did not have ssh access. You will need to ask your host.
Step 1 from SSH:
cd /usr/local/directadmin/data/templates
cp virtual_host_secure.conf custom
cd custom
pico virtual_host_secure.conf
Change the private_html to public_html save and exit
Step 2 from SSH:
code:echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
(This removes any existing private_html folders)
Step 3 from SSH:
cd /usr/local/directadmin/scripts/custom/
pico domain_create_post.sh
paste the following code in:
####################################
#!/bin/sh
#
# domain_create_post.sh - Runs AFTER a domain is created
#
# Remove private_html folder from user/domain directory.
#
rm -R -f /home/${username}/domains/${domain}/private_html
#####################################
save and exit.
chmod 700 domain_create_post.sh
Done.
test an account.
I guess there are other ways to do this as well, but this works well and DA will not overwrite this. Maybe this could be made into a tutorial since many people want to do this. John said he will coonsider making this a user level option. I guess it is easy enough for DA to do, but I don't see it as necessary.
This is easy enough to do permanently yourself. I did it yesterday.
Sorry I forgot that you did not have ssh access. You will need to ask your host.
Step 1 from SSH:
cd /usr/local/directadmin/data/templates
cp virtual_host_secure.conf custom
cd custom
pico virtual_host_secure.conf
Change the private_html to public_html save and exit
Step 2 from SSH:
code:echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
(This removes any existing private_html folders)
Step 3 from SSH:
cd /usr/local/directadmin/scripts/custom/
pico domain_create_post.sh
paste the following code in:
####################################
#!/bin/sh
#
# domain_create_post.sh - Runs AFTER a domain is created
#
# Remove private_html folder from user/domain directory.
#
rm -R -f /home/${username}/domains/${domain}/private_html
#####################################
save and exit.
chmod 700 domain_create_post.sh
Done.
test an account.
I guess there are other ways to do this as well, but this works well and DA will not overwrite this. Maybe this could be made into a tutorial since many people want to do this. John said he will coonsider making this a user level option. I guess it is easy enough for DA to do, but I don't see it as necessary.
Last edited: