By ralph1152009
I have a working and ssl enabled website in /var/www directory and I need to move it to its own directory /var/www/newdirectory or folder.
Move from /var/www to /var/www/folder
reason is I want to have multiple websites on same vps. here are the steps i have tried and failed.
I need guidance on the steps im missing here, I also thing i missed a2mod ssl disable comand i think.
any help would be gratefully appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
The steps that you’ve taken look fine, but you could just update the document root without disabling the site, you just need to restart Nginx after you’ve updated the document root. Your changes would not take effect unless Nginx is restarted.
Note that it is a good practice to always run a config test before restarting Nginx:
nginx -t
If you get Syntax OK then it is fine to do the restart.
Also note that you would need to update all of the references in your Wordpress database from /var/www/html to /var/www/newdir.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.