I am trying to move my observium to ssl only. I have ssl working right now when I use https://observium.mydomain.net . I want to redirect people if they connect to from http to https.
OS=centos 6.5 version=4861
Check out:
http://wiki.apache.org/httpd/RedirectSSL
http://wiki.apache.org/httpd/RewriteHTTPToHTTPS
On Tue, Jan 7, 2014 at 1:34 PM, Zach Underwood zunder1990@gmail.com wrote:
I am trying to move my observium to ssl only. I have ssl working right now when I use https://observium.mydomain.net . I want to redirect people if they connect to from http to https.
OS=centos 6.5 version=4861
-- Zach Underwood (RHCE,RHCSA,RHCT,UACA) My website http://zachunderwood.me My photos http://zunder1990.openphoto.me
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Mr. Underwood,
This is very easy to accomplish, with multiple paths with Apache (assuming you are using Apache/Httpd). I personally like virtual hosts as they make my life so easy. So for example, this will redirect from the HTTP subdomain to the HTTPS domain:
# More Info: https://httpd.apache.org/docs/2.2/vhosts/
<VirtualHost *:80> # Listen on HTTP ServerName observium. example.com # Force a redirect to HTTPS for any requests to observium. example.com RedirectPermanent / https://observium. example.com/ </VirtualHost>
<VirtualHost *:443> # Listen on HTTPS ServerName observium.example.com SSLEngine on DocumentRoot /opt/observium/html/ CustomLog /opt/observium/logs/access_log combined ErrorLog /opt/observium/logs/error_log <Directory "/opt/observium/html/"> AllowOverride All Options FollowSymLinks MultiViews </Directory> </VirtualHost>
Another great method is .htacccess (http://httpd.apache.org/docs/current/howto/htaccess.html).
Regards, Mark Lopez
From: observium [mailto:observium-bounces@observium.org] On Behalf Of Zach Underwood Sent: Tuesday, January 7, 2014 1:35 PM To: Observium Network Observation System Subject: [Observium] ssl
I am trying to move my observium to ssl only. I have ssl working right now when I use https://observium.mydomain.net . I want to redirect people if they connect to from http to https.
OS=centos 6.5 version=4861
Assume you are running Apache? If so lots of instructions out there for enabling SSL there.
https://duckduckgo.com/?q=enable+ssl+apache
For observium, I have a redirect rule for anything on tcp/80 as follows that does the redirect for me in the apache conf file (see the bottom virtual host to see the redirect rule). I'm sure there's 20 other ways to do it but this is working for me
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! in /etc/apache2/sites-available/default !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NameVirtualHost *:443
<IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin netadmin@mydomain.com DocumentRoot /opt/observium/html/ ServerName netobserver.mydomain.com CustomLog /opt/observium/logs/access_log combined ErrorLog /opt/observium/logs/error_log <Directory "/opt/observium/html/"> AllowOverride All Options FollowSymLinks MultiViews </Directory>
SSLEngine on SSLCertificateFile /etc/ssl/localcerts/apache.pem SSLCertificateKeyFile /etc/ssl/localcerts/apache.key
<FilesMatch ".(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory>
BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
Alias /provision /var/www/provision <Directory /var/www/provision> Order allow,deny Allow from all </directory>
Alias /phpmyadmin /var/www/phpmyadmin <Directory /var/www/phpmyadmin> Order allow,deny Allow from all </Directory> </VirtualHost>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!This is where the redirect happens
<VirtualHost *:80>
ServerName netobserver.mydomain.com
<Location />
Order deny,allow
Deny from all
</Location>
RewriteEngine On
RewriteRule ^/?(.*) https://netobserver.mydomain.com/$1 [R=301,L]
</VirtualHost>
Hope this helps, Kenny
On Tue, Jan 7, 2014 at 12:34 PM, Zach Underwood zunder1990@gmail.comwrote:
I am trying to move my observium to ssl only. I have ssl working right now when I use https://observium.mydomain.net . I want to redirect people if they connect to from http to https.
OS=centos 6.5 version=4861
-- Zach Underwood (RHCE,RHCSA,RHCT,UACA) My website http://zachunderwood.me My photos http://zunder1990.openphoto.me
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Thanks that worked. I just got a wildcard ssl and now time to go around setting up ssl.
On Tue, Jan 7, 2014 at 4:22 PM, Kenny Sallee kenny@netravine.com wrote:
Assume you are running Apache? If so lots of instructions out there for enabling SSL there.
https://duckduckgo.com/?q=enable+ssl+apache
For observium, I have a redirect rule for anything on tcp/80 as follows that does the redirect for me in the apache conf file (see the bottom virtual host to see the redirect rule). I'm sure there's 20 other ways to do it but this is working for me
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! in /etc/apache2/sites-available/default !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NameVirtualHost *:443
<IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin netadmin@mydomain.com DocumentRoot /opt/observium/html/ ServerName netobserver.mydomain.com CustomLog /opt/observium/logs/access_log combined ErrorLog /opt/observium/logs/error_log <Directory "/opt/observium/html/"> AllowOverride All Options FollowSymLinks MultiViews </Directory>
SSLEngine on SSLCertificateFile /etc/ssl/localcerts/apache.pem SSLCertificateKeyFile /etc/ssl/localcerts/apache.key <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown Alias /provision /var/www/provision <Directory /var/www/provision> Order allow,deny Allow from all </directory> Alias /phpmyadmin /var/www/phpmyadmin <Directory /var/www/phpmyadmin> Order allow,deny Allow from all </Directory>
</VirtualHost>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!This is where the redirect happens
<VirtualHost *:80>
ServerName netobserver.mydomain.com
<Location />
Order deny,allow Deny from all
</Location>
RewriteEngine On
RewriteRule ^/?(.*) https://netobserver.mydomain.com/$1 [R=301,L]
</VirtualHost>
Hope this helps, Kenny
On Tue, Jan 7, 2014 at 12:34 PM, Zach Underwood zunder1990@gmail.comwrote:
I am trying to move my observium to ssl only. I have ssl working right now when I use https://observium.mydomain.net . I want to redirect people if they connect to from http to https.
OS=centos 6.5 version=4861
-- Zach Underwood (RHCE,RHCSA,RHCT,UACA) My website http://zachunderwood.me My photos http://zunder1990.openphoto.me
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
-- Netravine Founder | Kenny Sallee | Kenny@netravine.com | 503.330.2430
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (4)
-
Chris Stone
-
Kenny Sallee
-
Mark Lopez
-
Zach Underwood