LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Configure SSL Virtual Domain (https://www.linuxquestions.org/questions/linux-security-4/configure-ssl-virtual-domain-357953/)

stlyz3 08-28-2005 11:30 PM

Configure SSL Virtual Domain
 
I am having trouble getting both a subdomain and the subdomain to have https security. I do have both modSSL and openSSL installed. I have created a subdomain off of my main domain in the folder subs/subdomain. I am using the following configuration on the server:

1. OS - Centos 4
2. Webmin and VirtualMin for management
3. Here is the .htaccess file

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} subdomain.domain.com
RewriteCond %{REQUEST_URI} !subs/subdomain/
RewriteRule ^(.*)$ subdomain/$1 [L]
RewriteCond %{SERVER_PORT}!^443$
RewriteRule ^(.*)$ https://subdomain.domain.com/$1 [R]

This file is in the document root. Is there something else that I should be doing to get the site to show correctly?

jdogpc 08-29-2005 07:09 AM

Have you tried to use virtual host instead of htaccess with the rewrite module.

#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

you MUST USE '<VirtualHost subdomain.domain.com:443>' because you're using ssl, this is requirement of Apache.

Worked for me aldo it was with http.
Let me know.
JdogPC

stlyz3 08-29-2005 02:38 PM

I use IP address routing for the subdomain and when I put in the number for the subdomain, apache wont restart. It gives an error of not being able to find the fully quantified domain name on 127.0.0.1. Does the IP address complicate things?

jdogpc 08-29-2005 05:25 PM

The error for not finding the FQDN of 127.0.0.1 is not serious or fatal, if Apache doesn't it because there something more.
Can you post the virtual host part of the conf file so that I can take a look?


All times are GMT -5. The time now is 01:37 AM.