Ubuntu 12.04 has reached end-of-life. The steps and commands used in this guide may no longer be relevant to newer versions of Ubuntu.<\/strong><\/span><\/p>\n<\/div>\n<\/div>\n The default installation of Squid on Ubuntu 12.04 does not support SSL. To enable SSL, it must be recompiled. This guide will walk you through compiling Squid on Ubuntu 12.04 to add SSL support. Although we are targeting Ubuntu 12.04, this guide will also work on Ubuntu 14.<\/p>\n Install dependencies.<\/p>\n Change the default compiler options to include SSL support.<\/p>\n Compile.<\/p>\n Install it. The compiled file exists in the\u00a0 Test whether or not the compiled version supports SSL. If you see the “enable – SSL” output, then the compile was successful.<\/p>\n Generate a self-signed certificate.<\/p>\n Move the server certificate to the\u00a0 Enable HTTPS and specify the certificate.<\/p>\n Verify that the configuration file is formatted properly.<\/p>\n Run the Squid service.<\/p>\n Setup is complete. Squid 3 will now be working with HTTPS. Enjoy.<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[242,245,247],"manual_kb_tag":[462],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2926"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2926"}],"version-history":[{"count":3,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2926\/revisions"}],"predecessor-version":[{"id":2929,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2926\/revisions\/2929"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2926"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2926"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Compile Squid<\/h3>\n
cd ~ \r\nmkdir squid_src \r\ncd squid_src \r\nsudo apt-get install build-essential fakeroot devscripts gawk gcc-multilib dpatch \r\nsudo apt-get build-dep squid3 \r\nsudo apt-get build-dep openssl \r\nsudo apt-get source squid3 \r\nsudo apt-get install libssl-dev \r\nsudo apt-get install openssl \r\n<\/code><\/pre>\n
vi squid3-3.1.19\/debian\/rules\r\n\r\n... add these rules to \"DEB_CONFIGURE_EXTRA_FLAGS\":\r\n\r\nDEB_CONFIGURE_EXTRA_FLAGS := --datadir=\/usr\/share\/squid3 \\ \r\n --sysconfdir=\/etc\/squid3 \\ \r\n --mandir=\/usr\/share\/man \\ \r\n --with-cppunit-basedir=\/usr \\ \r\n --enable-inline \\ \r\n --enable-ssl \\ \r\n<\/code><\/pre>\n
cd squid3-3.1.19\/ \r\ndebuild -us -uc -b \r\n<\/code><\/pre>\n
squid_src<\/code>\u00a0directory.<\/p>\n
cd .. \r\nsudo dpkg -i squid3_3.1.19-1ubuntu3.12.04.2_amd64.deb squid3-common_3.1.19-1ubuntu3.12.04.2_all.deb squid3-dbg_3.1.19-1ubuntu3.12.04.2_amd64.deb \r\n<\/code><\/pre>\n
squid3 -v |grep enable-ssl\r\n<\/code><\/pre>\n
Configure SSL and start Squid<\/h3>\n
openssl req -new -keyout key.pem -nodes -x509 -days 365 -out cert.pem \r\n<\/code><\/pre>\n
squid3<\/code>\u00a0configuration directory.<\/p>\n
sudo mv cert.pem \/etc\/squid3\/cert.pem\r\nsudo mv key.pem \/etc\/squid3\/key.pem\r\n<\/code><\/pre>\n
sudo vi \/etc\/squid3\/squid.conf \r\n\r\n... add this line:\r\n\r\nhttps_port 443 cert=\/etc\/squid3\/cert.pem key=\/etc\/squid3\/key.pem \r\n<\/code><\/pre>\n
squid3 -k parse \r\n<\/code><\/pre>\n
sudo service squid3 restart\r\n<\/code><\/pre>\n