Permalinks not working Apache + CentOS 7

2018-06-24 18:30:43

I have a running CentOS 7 with Apache 2 mariadb stack with vhosts and Let's Encrypt.

I've installed WordPress 4.9.6 on a virtual host using debian style (sites-available -> sites-enabled).

My problem is that I cannot use permalinks. I copy my server configuration below.

getenforce

Disabled

/etc/httpd/sites-available/example.com.conf:

ServerName www.example.com

ServerAlias example.com

DocumentRoot /var/www/example.com/public_html

ErrorLog /var/www/example.com/error.log

CustomLog /var/www/example.com/requests.log combined

RewriteEngine on

RewriteCond %{SERVER_NAME} =example.com [OR]

RewriteCond %{SERVER_NAME} =www.example.com

RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

/etc/httpd/sites-available/example.com-le-ssl.conf:

ServerName www.example.com

ServerAlias example.com

DocumentRoot /var/www/example.com/public_html

ErrorLog /var