I am trying to implement let's encrypt
with certbot
and I am using lighttpd
on CentOS 6
So this is my full conf file for my host
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/letsencrypt/live/mysite.com/web.pem"
ssl.ca-file = "/etc/letsencrypt/live/mysite.com/chain.pem"
server.name = "mysite.com"
server.document-root = "/home/mysite/public_html"
server.errorlog = "/var/log/lighttpd/mysite.com_error.log"
accesslog.filename = "/var/log/lighttpd/mysite.com_access.log"
ssl.cipher-list = "ECDHE-RSA-CHACHA20-POLY1305 ECDHE-ECDSA-CHACHA20-POLY1305 AES128+EECDH:AES128+EDH:!aNULL:!eNULL"
ssl.honor-cipher-order = "enable"
ssl.disable-client-renegotiation = "enable"
ssl.use-sslv2= "disable"
ssl.use-sslv3 = "disable"
}
$HTTP["scheme"] == "http" {
$HTTP["host"] =~ "^(www.)?mysite.com$" {
server_name = "mysite.com"
server.document-root = "/home/mysite/public_html"
accesslog.filename = "/home/mysite/logs/access.log"
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fpm.socket.mysite"
)
)
)
url.rewrite-once = (
# Exclude some directories from rewriting
"^/(\.well-known|wp-admin|wp-includes|wp-content|phpmyadmin)/(.*)" => "$0",
# Exclude .php files at root from rewriting
"^/(.*.php)" => "$0",
# Handle search correctly
"^/(.*)?(?s=)(.*)$" => "/search/$3",
# Handle permalinks and feeds
"^/(.*)$" => "/index.php/$1",
"^/?$" => "/index.php",
)
alias.url = ("/phpmyadmin" => "/usr/share/phpmyadmin/")
}
}
So first problem I am having is that when i try to go to https:// mysite.com
i get content without images and style so that is a url-rewrite problem but i don't see that https is enabled. Is still get warning from browser that my site is not secure.
Second issue is when i add url.redirect = (".*" => "https://%0$0")
i get too many redirect ERROR.
So I am puzzled. I think problem might be with rewrites, but it's odd that i don't even have https enabled.
P.S. And yes I got success message from certbot
before all this.
THE SOLUTION was just to install WP plugin that would turn all my http links to images and styles to https and now it's working. @mrkoopie answer helped me think about the solution in that way so I am accepting it.