I'd like to integrate Calibre Server on Apache Site with SSL Authentication.
I have set up a virtual NIC IP only for calibre.
My ebooks.conf in Apache:
<IfModule mod_ssl.c>
<VirtualHost 192.x.y.z:443>
ErrorLog /var/log/apache2/error-calibre-xx.log
CustomLog /var/log/apache2/access-calibre-xx.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
ServerName books.example.org
<Location / >
AuthType Basic
AuthName "Restricted"
AuthBasicProvider file
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Location>
ProxyPreserveHost On
ProxyPass / http://192.x.y.z:8081/
ProxyPassReverse / http://192.x.y.z:80/
</VirtualHost>
</IfModule>
<VirtualHost 192.x.y.z:80>
ServerName books.example.org
Redirect permanent / https://books.example.org/
</VirtualHost>
It's ok if user type in browser books.example.org but if he type 192.x.y.z:8081, he got calibre home page without authentication...
:help:
I have set up a virtual NIC IP only for calibre.
My ebooks.conf in Apache:
<IfModule mod_ssl.c>
<VirtualHost 192.x.y.z:443>
ErrorLog /var/log/apache2/error-calibre-xx.log
CustomLog /var/log/apache2/access-calibre-xx.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
ServerName books.example.org
<Location / >
AuthType Basic
AuthName "Restricted"
AuthBasicProvider file
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Location>
ProxyPreserveHost On
ProxyPass / http://192.x.y.z:8081/
ProxyPassReverse / http://192.x.y.z:80/
</VirtualHost>
</IfModule>
<VirtualHost 192.x.y.z:80>
ServerName books.example.org
Redirect permanent / https://books.example.org/
</VirtualHost>
It's ok if user type in browser books.example.org but if he type 192.x.y.z:8081, he got calibre home page without authentication...
:help: