changing documentroot, what file to edit?

roly

Verified User
Joined
Nov 9, 2006
Messages
165
Hi

just a quick one, I need to change the documentroot for a particular domain. i can edit the httpd.conf it and it works, but is this file written over by directadmin /usr/local/directadmin/data/users/admin/httpd.conf? which is the actual file I need to edit? I tried using the httpd.conf cusomtization from within the control panel but I'm not sure what i was doing with that, it was just duplicating entries. i would rather just edit the file itself directly, can anyone advise which file to edit?

Thanks in advance

 
Hello.
Custom HTTPD Configurations - httpd.conf - Customize -
|?DOCROOT=/home/user/new/new|
thank you, dumb question do i put that here? I tried that and i get an error "DocumentRoot takes one argument, Root directory of the document tree"
 

Attachments

  • http.jpg
    http.jpg
    40.2 KB · Views: 3
hi, well that inserted |?DOCROOT=/home/admin/domains/domain.com/public_html/public| into /usr/local/directadmin/data/users/admin/httpd.conf

rather than the correct format and left the original documentroot there DocumentRoot "/home/admin/domains/domain.com/public_html"
 
That’s strange - are you checking the right domain? Could you send the full contents of httpd.conf via private message? Or post it here, but with sensitive data removed?
 
Code:
|?DOCROOT=`HOME`/domains/`DOMAIN`/project/public|

try this, I recommend to move your project out of default public_html dir, like into "{domain}/project/"
because sometime it might broken the DOCROOT and accident expose sensitive storage to public access


carefully the format must be : |?...| without contains any spaces
 
Back
Top