Apache HTTPS question
i setup SSL/TLS on apache 2.0.
Its working fine apache only listen on 443 port for incoming connections. My question is:
How to config apache , for example when user type www.dome.com to automatic redirect him to port 443 and https connection. Now when i use www.domain.com he dont display anything because apache don listen on 80.
You would need to setup another vhost to listen on port 80 and then use an apache rewrite to point at the https address:
This should work:
RewriteRule ^/(.*) https://domain.com/$1
i put in my host file in VirtualHost *:80
Sorry, I think it's my mistake - I forgot the remote (external redirect) option:
RewriteRule ^/(.*) https://126.96.36.199/$1 [R]
heh i put that in vhost file..
Options Indexes FollowSymLinks MultiViews
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
#RedirectMatch permanent (/.*) https://x.x.x.x.
RewriteRule ^/(.*) https://x.x.x.x./$1 [R]
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Allow from all
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
but same shit :)
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|All times are GMT -5. The time now is 01:08 AM.|