My Scenario:
i have running apache severing my UI and i have my node api running on port 2000 and i have a reserves proxy on apache to proxy request to api and i have configure ssl as well and i want to redirect http to https. this is my following config
ServerAdmin admin@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com/public_html
RewriteEngine on
RewriteRule ^/api/v1/(.*) http://localhost:2000/api/v1/$1 [P,L]
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSL config
ServerAdmin admin@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/example.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/pkey.key
SSLOptions +StdEnvVars
SSLOptions +StdEnvVars
i'm getting too many redirects, how can i solve this?
No comments:
Post a Comment