Hey, I am noticing through the demos etc that HTTPS and HTTP data are in the same folder... Is there a way to separate them? I need to because I have an intranet type site that has a separate Http site and https site and I want to keep it this way.
Hey, I am noticing through the demos etc that HTTPS and HTTP data are in the same folder... Is there a way to separate them? I need to because I have an intranet type site that has a separate Http site and https site and I want to keep it this way.
I kind of need to know this soon because I need to get a new server up and running within the next ~week...
Http and https have the same document root in httpd.conf and contents are stored in same folder .
You might want to try changing the document root in httpd.conf for domain.com:443
You'll need to have root level access to edit /usr/local/apache/conf/httpd.conf to do this. You should see a configuration set for the domain that looks something like this:
<VirtualHost xx.xxx.xx.xx:443>
ServerName yyyyyy.com
Server Alias www.yyyyyyy.com
DocumentRoot /home/username/public_html
....
.....
</VirtualHost>
Change the DocumentRoot line from /home/username/public_html to the folder that your https site should go to and then close httpd.conf in your editor.
Then run this command:
Then restart Apache for the changes to take effect.Code:/usr/local/cpanel/bin/apache_conf_distiller --update
If you do not have root level access to the server and are a domain owner, you'll need to create a file called .htaccess in your public_html directory containing these lines:
RewriteCond %{SERVER_PORT} 443
RewriteRule ^/$ /directory_to_send_visitors_to
This is only valid if the server owner has mod_rewrite enabled in Apache.
I do not think so that you can do it automatically. As Apache will automatically set DocumentRoot as
/home/username/public_html in /usr/local/apache/conf/httpd.conf when you create a new domain from WHM.
You might want to try changing the document root in httpd.conf for domain.com:443