I have a droplet with multiple wordpress instances running? I would like to install SSL certificate for one of the domain? Example I have www.site1.com and www.site2.com running on the same droplet.
I would like to have Site1.com moved to https://www.site1.com, while site2.com will remain as non-SSL. The ssl certificate is from godaddy.
I have update the .htaccess to use <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://site1.coml/$1 [R,L] </IfModule>
also when I install and change the site1.com.conf file in sites-available , the site2.com is not loading. without installing SSL, both site1.com and site2.com are working fine.
Kindly Help?
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!
You will likely want to create 3 VirtualHost configurations in /etc/apache2/sites-enabled
This will be the name based virtualhost for site2.com and will be set up fairly standard but ensuring that AllowOverride All is set to enable Apache to use WordPress’ .htaccess files.
This will be another port 80 http definition which will point to site2.com’s directory. Since you are using an .htaccess redirect this can also be fairly standard since we can expect anyone hitting this virtualhost will be redirected to the https version via the .htaccess file.
This third virtualhost will be IP based rather than name based and will listen on port 443. This is where you will configure your certificates. This virtualhost should be pointed to the directory for site1.com
Here are a few guides that will be helpful in setting this up:
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.