Install SSL certificate manually on serverpilot for Apache

Hi all,

As a serverpilot free user, I’m struggling to config ssl to use https on my Ubuntu server.

  1. I followed this tutorial to prepare the key/certs:

  2. I configured /etc/apache-sp/vhosts.d/app-domain.conf:

		Define DOCUMENT_ROOT /srv/users/serverpilot/apps/app-domain/public
		Define PHP_PROXY_URL unix:/srv/users/serverpilot/run/app-domain.php-fpm.sock|fcgi://localhost

		ServerAdmin webmaster@
		DocumentRoot ${DOCUMENT_ROOT}
		ServerName app-domain

		ErrorLog "/srv/users/serverpilot/log/app-domain/app-domain_apache.error.log"
		CustomLog "/srv/users/serverpilot/log/app-domain/app-domain_apache.access.log" common

		RemoteIPHeader X-Real-IP
		SetEnvIf X-Forwarded-SSL on HTTPS=on

		IncludeOptional /etc/apache-sp/vhosts.d/app-domain.d/*.conf

		Define DOCUMENT_ROOT /srv/users/serverpilot/apps/app-domain/public

		SSLEngine on
		SSLProtocol all -SSLv2

		SSLCertificateFile /etc/apache-sp/certs/app-domain/app-domain.cert
		SSLCertificateKeyFile /etc/apache-sp/certs/app-domain/private.key
			SSLCertificateChainFile /etc/apache-sp/certs/app-domain/

		ServerAdmin webmaster@
		DocumentRoot ${DOCUMENT_ROOT}

		ErrorLog "/srv/users/serverpilot/log/app-domain/https_app-domain_apache.error.log"
		CustomLog "/srv/users/serverpilot/log/app-domain/https_app-domain_apache.access.log" common


but it doesn’t work and i cannot find any error message.

many thanks in advance.

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This comment has been deleted

@liang2 ok,ok. How about you remove apache and install it your own ?

sudo cp -r  /etc/apache-sp /etc/apache_old
apt-get purge apache2

You can follow the tutorial, I wouldn’t do something else, in the way of explaining.

I hope that a fresh install can help you. As it’s most of the time.

Welcome to DigitalOcean.

Just one question to be clear, do you even have an SSL/TSL Certificate? This tutorial is for using the Certificate from StartSSL.

You should change this line: <VirtualHost> to <VirtualHost> Remove this line ServerAlias Don’t forget to restart your Server service apache2 restart