# Confused about https://



## millionaire_mind (May 25, 2010)

When I go to http://www.mysite.com/index.html it loads the standard home page, but when I go to https://www.mysite.com/index.html it simply loads a page that says "It Works".

Is there a special thing I need to do to load a page in a secure environment?


----------



## tkjacobsen (May 25, 2010)

In the default apache22 configuration, if you include httpd-ssl.conf it adds 
	
	



```
<VirtualHost _default_:443>
DocumentRoot "/usr/local/www/apache22/data"
...
```
which is the "It works" page...

If you want the same vhost on both port 80 (http) and 443 (https) you need to copy it and add a couple of lines:

```
<VirtualHost *:80>
....
</VirtualHost>

<VirtualHost *:443>
...
    SSLEngine on
    SSLCertificateFile "/usr/local/etc/apache22/server.crt"
    SSLCertificateKeyFile "/usr/local/etc/apache22/server.key"
</VirtualHost>
```

This works perfectly for me!


EDIT:
If you're at not using virtual hosts, you at least have to point it to the same document root!

EDIT:
By convention, you should always use example.com for examples... http://en.wikipedia.org/wiki/Example.com


----------



## millionaire_mind (May 25, 2010)

That works perfect!!!  I changed the DocumentRoot and it is working now.  Thank You!!!


----------

