Last active
June 28, 2017 22:16
-
-
Save slackero/b8784bd68c006c10b861 to your computer and use it in GitHub Desktop.
Ubuntu 14.04 with Plesk 12: move /var/www/vhosts to another location
This file contains 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
Use "sudo command" or as root user: | |
=================================== | |
In this example /var/www/vhosts is moved to /data/www/vhosts on another partition. Change all steps as your needed for your location. | |
1) Stop services | |
~# /etc/init.d/psa stopall | |
OR | |
~# /etc/rc.d/init.d/psa stopall | |
~# /etc/init.d/apache2 stop | |
~# /etc/init.d/mysql stop | |
OR | |
~# service mysql stop | |
2) Move /var/www/vhosts -> /data/www | |
~# mkdir /data/www | |
~# mv /var/www/vhosts /data/www/vhosts | |
~# ln -s /data/www/vhosts /var/www/vhosts | |
3) Edit "/etc/psa/psa.conf" | |
Change HTTPD_VHOSTS_D in psa.conf to | |
HTTPD_VHOSTS_D /data/www/vhosts | |
3) Enhance Apache config "/etc/apache2/conf-enabled/aa001_data_www.conf" | |
<Directory /data/www/> | |
Options Indexes FollowSymLinks | |
AllowOverride None | |
Require all granted | |
</Directory> | |
4) Edit Plesk Apache config "/etc/apache2/plesk.conf.d/server.conf" | |
Search for "/var/www/vhosts" and replace by "/data/www/vhosts" | |
5) Start services | |
~# /etc/init.d/mysql start | |
OR | |
~# service mysql start | |
6) Reconfigure Plesk | |
~# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all | |
7) Check "/etc/apache2/plesk.conf.d/server.conf" | |
Is still everything in there as expected, e.g. "/data/www/vhosts"? If Yes, then | |
8) Start services | |
~# /etc/init.d/apache2 start | |
~# /etc/init.d/psa startall | |
OR | |
~# /etc/rc.d/init.d/psa startall | |
That's it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In step 7 server.conf change again to /var/www/vhosts, can you help me?