LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-28-2005, 11:30 PM   #1
stlyz3
Member
 
Registered: Mar 2005
Posts: 54

Rep: Reputation: 15
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?
 
Old 08-29-2005, 07:09 AM   #2
jdogpc
Member
 
Registered: Jul 2005
Location: Mafra, PT
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
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
 
Old 08-29-2005, 02:38 PM   #3
stlyz3
Member
 
Registered: Mar 2005
Posts: 54

Original Poster
Rep: Reputation: 15
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?
 
Old 08-29-2005, 05:25 PM   #4
jdogpc
Member
 
Registered: Jul 2005
Location: Mafra, PT
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Hosting for ssl connections? anorman Linux - Networking 1 11-23-2005 05:28 PM
what would make ever virtual domain name resolve to one domain name on my system kuplo Linux - Newbie 1 11-14-2005 06:57 PM
Virtual Name Hosting And SSL ryedunn Linux - Newbie 6 12-31-2004 01:41 PM
Apache + SSL + Virtual Hosts otisthegbs Linux - Software 3 10-05-2004 07:59 PM
Apache2, SSL, 2 Virtual Hosts franticbob Linux - Software 0 04-07-2004 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration