Created
March 26, 2014 15:40
-
-
Save masum-sg/9786279 to your computer and use it in GitHub Desktop.
Changing default document root in Plesk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inorder to change default document root for a domain hosted in a plesk control panel we need to create vhost.conf file in the directory in which http.include for the domain resides. Directly changing the document root entry in httpd.include causes the modification to be overwritten with default entry since plesk overwrites entries in configuration files with database entries | |
Entries to be put in the vhost.conf follows | |
DocumentRoot /path/to/your/new/root | |
<Directory /path/to/your/new/root> | |
# Put this if you really need all options? | |
Options Indexes ExecCGI FollowSymLinks MultiViews | |
AddHandler cgi-script .cgi | |
# are you using .htaccess files? if not, set it from all to none | |
AllowOverride all | |
Order allow,deny | |
Allow from all | |
</Directory> | |
Also try to run the websrvmng just to make sure that plesk will make use of vhost.conf for document root instead of httpd.include | |
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=domain.com | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment