SSL Question #26

Closed
opened 2019-10-24 20:53:16 +02:00 by okwindart · 1 comment
okwindart commented 2019-10-24 20:53:16 +02:00 (Migrated from github.com)

I have BookStack working well with Centos and Apache. However I would like to know what the process is for setting up a wildcard SSL cert....

Do I need to make path changes in the "ssl.conf" file located under /etc/httpd/conf.d to show where the key and cert files are located?

Or should I just do this in the "bookstack.conf" file located under /etc/httpd/sites-available?

Can't seem to find SSL setup in the docs. Any help is appreciated!

Thanks,
Ken

I have BookStack working well with Centos and Apache. However I would like to know what the process is for setting up a wildcard SSL cert.... Do I need to make path changes in the "ssl.conf" file located under /etc/httpd/conf.d to show where the key and cert files are located? Or should I just do this in the "bookstack.conf" file located under /etc/httpd/sites-available? Can't seem to find SSL setup in the docs. Any help is appreciated! Thanks, Ken
okwindart commented 2019-10-25 17:45:17 +02:00 (Migrated from github.com)

I got it to work! I had httpd running since mine is a Centos machine. I had to change what was put here by Dan Brown: https://github.com/BookStackApp/BookStack/issues/1520

For anyone interested in installing SSL on Centos7 VM, this is what worked for me.

<VirtualHost *:443>
	ServerName whatever.me
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/bookstack/public/

    SSLEngine on
    SSLCertificateFile      /etc/pki/tls/certs/my.crt
    SSLCertificateKeyFile   /etc/pki/tls/private/my.key

    <Directory /var/www/bookstack/public/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
        <IfModule mod_rewrite.c>
            <IfModule mod_negotiation.c>
                Options -MultiViews -Indexes
            </IfModule>

            RewriteEngine On

            # Handle Authorization Header
            RewriteCond %{HTTP:Authorization} .
            RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

            # Redirect Trailing Slashes If Not A Folder...
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteCond %{REQUEST_URI} (.+)/$
            RewriteRule ^ %1 [L,R=301]

            # Handle Front Controller...
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^ index.php [L]
        </IfModule>
    </Directory>

	ErrorLog /var/log/httpd/bookstack-error.log
	CustomLog /var/log/httpd/bookstack-access.log combined
	
</VirtualHost>
I got it to work! I had httpd running since mine is a Centos machine. I had to change what was put here by Dan Brown: https://github.com/BookStackApp/BookStack/issues/1520 For anyone interested in installing SSL on Centos7 VM, this is what worked for me. ``` <VirtualHost *:443> ServerName whatever.me ServerAdmin webmaster@localhost DocumentRoot /var/www/bookstack/public/ SSLEngine on SSLCertificateFile /etc/pki/tls/certs/my.crt SSLCertificateKeyFile /etc/pki/tls/private/my.key <Directory /var/www/bookstack/public/> Options Indexes FollowSymLinks AllowOverride None Require all granted <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule> </Directory> ErrorLog /var/log/httpd/bookstack-error.log CustomLog /var/log/httpd/bookstack-access.log combined </VirtualHost> ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bookstack/devops#26
No description provided.