changing documentroot, what file to edit?

roly

Verified User
Joined
Nov 9, 2006
Messages
166
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: 7
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
 
He says the override didn't work, which is strange since it has always worked fine. I checked on the test server, and it worked successfully there too.
 
Thanks guys for all your help it's appreciated. as it happened i decided to put this on it's own subdomain for another reason and fortunately i notice you can set the document root in that. However i need to change the httpd.conf for something else on this subdomain, but when i go to change it in the custom http.conf editor it only lists domain.com and not sub.domain. do i use the editor for the main domain (it doesn't matter if it puts the following entry on both main and sub domain?

i need to insert:

<Directory /var/www/domain.com/public>
AllowOverride FileInfo
</Directory>

where do i enter this?

thanks in advance
 
Back
Top