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 9321477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:51:44+00:00 2026-06-19T03:51:44+00:00

I’m trying to enable multiple domains in my environment Development, but am not succeeding

  • 0

I’m trying to enable multiple domains in my environment Development, but am not succeeding the way I tried below, at which point I’m wrong?

I installed httpd and changed DocumentRoot in httpd.conf to:

C:/Webserver/www

*I changed the Windows hosts file to(in Italics would like to access):
If I switch to 127.0.0.1 api.rotadorock the address resolves to www/ but the right is www/rotadorock/api.

127.0.0.1                       localhost
127.0.0.1                       webserver
127.0.0.1/rotadorock/ecommerce  rotadorock
127.0.0.1/rotadorock/api        api.rotadorock
127.0.0.1/rotadorock/ecommerce  ecommerce.rotadorock
127.0.0.1/rotadorock/mobile     mobile.rotadorock
127.0.0.1/rotadorock/sistema    sistema.rotadorock
127.0.0.1/rotadorock/social     social.rotadorock

*Update(windows hosts file)

I removed the hosts file changes I mentioned above, because as @Volker Birk said are not necessary. But even so, still can not access as desire (api.rotadorock/ or localhost/api.rotadorock/ and should point to C:/Webserver/www/rotadorock/api). What could be wrong?

And finally changed httpd-vhost.conf for:

NameVirtualHost webserver:80

<Directory "C:/Webserver/www">
    Options All
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "c:/Webserver/www"
    ServerAlias localhost
    ErrorLog "logs/httpd-error.log"
    CustomLog "logs/httpd-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerName webserver
    DocumentRoot "c:/Webserver/www"
    ServerAlias webserver
    ErrorLog "logs/httpd-error.log"
    CustomLog "logs/httpd-access.log" common
</VirtualHost>

<VirtualHost rotadorock:80>
    ServerName rotadorock
    DocumentRoot "c:/Webserver/www/rotadorock/ecommerce"
    ServerAlias rotadorock
    ErrorLog "logs/httpd-error.log"
    CustomLog "logs/httpd-access.log" common
</VirtualHost>

<VirtualHost api.rotadorock:80>
    ServerName api.rotadorock
    DocumentRoot "c:/Webserver/www/rotadorock/api"
    ServerAlias api.rotadorock
    ErrorLog "logs/httpd-error.log"
    CustomLog "logs/httpd-access.log" common
</VirtualHost>

<VirtualHost ecommerce.rotadorock:80>
    ServerName ecommerce.rotadorock
    DocumentRoot "c:/Webserver/www/rotadorock/ecommerce"
    ServerAlias ecommerce.rotadorock
    ErrorLog "logs/httpd-error.log"
    CustomLog "logs/httpd-access.log" common
</VirtualHost>

<VirtualHost mobile.rotadorock:80>
    ServerName mobile.rotadorock
    DocumentRoot "c:/Webserver/www/rotadorock/mobile"
    ServerAlias mobile.rotadorock
    ErrorLog "logs/httpd-error.log"
    CustomLog "logs/httpd-access.log" common
</VirtualHost>

<VirtualHost sistema.rotadorock:80>
    ServerName sistema.rotadorock
    DocumentRoot "c:/Webserver/www/rotadorock/sistema"
    ServerAlias sistema.rotadorock
    ErrorLog "logs/httpd-error.log"
    CustomLog "logs/httpd-access.log" common
</VirtualHost>

<VirtualHost social.rotadorock:80>
    ServerName social.rotadorock
    DocumentRoot "c:/Webserver/www/rotadorock/social"
    ServerAlias social.rotadorock
    ErrorLog "logs/httpd-error.log"
    CustomLog "logs/httpd-access.log" common
</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-06-19T03:51:45+00:00Added an answer on June 19, 2026 at 3:51 am

    Finally solved the problem. And I could just using the Windows hosts file and httpd-vhosts.conf httpd together.

    Let me give an example of what was done to enable multiple subdomains accessing locally.
    On Windows hosts file to add, for each domain and subdomain you want something like this:

    127.0.0.1    api.rotadorock #my subdomain
    127.0.0.1    rotadorock #my domain
    

    And then the httpd-vhosts apache httpd:

    # Accessing the API
    <VirtualHost 127.0.0.1>
        DocumentRoot "C:/Webserver/www/rotadorock/api"
        ServerName api.rotadorock
        ServerAlias ​​api.rotadorock
    
        <Directory "C:/Webserver/www/rotadorock/api">
            All Options Includes Indexes
        </ Directory>
    </VirtualHost>
    
    # Accessing the domain
    <VirtualHost 127.0.0.1>
        DocumentRoot "C:/Webserver/www/rotadorock/"
        ServerName rotadorock
        ServerAlias ​​*.rotadorock
    
        <Directory "C:/Webserver/www/rotadorock/">
            All Options Includes Indexes
        </Directory>
    </VirtualHost>
    

    And then that way I could access api.rotadorock/ and rotadorock/ locally. I tried all ways without the hosts file. But just gotta use it. If someone can explain to me how it should have done so it would not need to use the hosts I would be grateful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to select an H1 element which is the second-child in its group
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Basically, what I'm trying to create is a page of div tags, each has
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into

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.