Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johannesjo/99b6eaa0586c0035f7c6 to your computer and use it in GitHub Desktop.
Save johannesjo/99b6eaa0586c0035f7c6 to your computer and use it in GitHub Desktop.
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