Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7413921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:58:35+00:00 2026-05-29T06:58:35+00:00

On my dev machine, I want to be able to have an SSL server,

  • 0

On my dev machine, I want to be able to have an SSL server, and a non-SSL server (both running off the same code… but running both servers is the easy part.)

For my regular server: I want it to be sub1.mydomain.com

so, I’ve modified my VirtualHost such that instead of saying

mydomain.com
*.mydomain.com,

it says

sub1.mydomain.com
*.sub1.mydomain.com

and then for the SSL server, I just said

sub2.mydomain.com
*.sub2.mydomain.com

except, whenever I got to a sub2.mydomain url, the server attached to sub1 processes the request.

What am I doing wrong here?

I’m using ruby on rails, and apache.

EDIT: added the actual virtual hosts

<VirtualHost *:80>
    DocumentRoot "/Users/me/projects/myproject/public"
    ServerName reg.mydomain.com
    #ServerAlias *.reg.mydomain.com
    ProxyPass / http://localhost:3001/
    ProxyPassReverse / http://localhost:3001
</VirtualHost>


<VirtualHost *:443>
    SSLEngine on
    SSLProxyEngine On
    RequestHeader set Front-End-Https "On"
    CacheDisable *
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    DocumentRoot "/Users/me/projects/myproject/public"
    ServerName ssl.mydomain.com
    #ServerAlias *.ssl.mydomain.com
    SSLCertificateKeyFile "/private/etc/apache2/certs/server.key"
    SSLCertificateFile "/private/etc/apache2/certs/server.crt"

    ProxyPass / https://localhost:3002/
    ProxyPassReverse / https://localhost:3002
    ProxyPreserveHost on    
</VirtualHost>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:58:36+00:00Added an answer on May 29, 2026 at 6:58 am

    It sounds like you’re trying to do named virtual hosts?

    http://httpd.apache.org/docs/2.2/vhosts/name-based.html

    Assuming that rails isn’t doing anything too funky, you can try having a virtual host that looks like this:

    NameVirtualHost *
    
    <VirtualHost *>
    ServerName sub1.mydomain.com
    DocumentRoot /var/www/sub1 or point this to the server instead.
    </VirtualHost>
    
    <VirtualHost *>
    ServerName sub2.mydomain.com
    DocumentRoot /var/www/sub2 or point this to the server instead.
    </VirtualHost>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service which works on my dev machine running IIS 7,
I have an app.Config that was created on the dev machine running Windows 7.
I want the asset precompile to happen on my dev machine beofore the code
On a Vista dev machine I used this code successfully to change user Administrator
My app (winforms .net 2.0 / vs2008) works fine on my dev machine but
I have created an SSIS package and it works great on my dev machine.
My activity needs to communicate with a java server located on my dev machine.
Which lightweight SQL Server type could I use on my Dev machine for a
I want to set up my dev machine to run multiple VMs in parallel
I've got a Windows 7 machine upon which I do both PHP/MySql Dev, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.