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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:25:27+00:00 2026-05-14T14:25:27+00:00

I have several VirtalHosts set up on my computer. I’d like to visit the

  • 0

I have several VirtalHosts set up on my computer. I’d like to visit the site I’m currently working on from a different PC using the my comp’s ip address, but every config i’ve tried keeps taking me to a different virtual host (in fact the first virtualhost I set up on my comp). How do I set up the apache virtualhost configs to ensure that the ip address takes me to the site I want it to.

/etc/apache2/sites-available/site-i-want-to-show-up-with-ip-address.conf contains:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

ServerAlias currentsite.com

DocumentRoot /path/to/root/of/site-i-want-to-show-up
ServerName localhost

ScriptAlias /awstats/ /usr/lib/cgi-bin/

CustomLog /var/log/apache2/current-site-access.log combined
</VirtualHost>

And /etc/apache2/sites-available/site-that-keeps-showing-up.conf contains:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerAlias theothersite.com
    DocumentRoot /path/to/it
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

</VirtualHost>

I’d appreciate anyone’s help.

Also, I don’t know too much about configuring web servers, and I used tutorials to get the above code.

  • 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-14T14:25:27+00:00Added an answer on May 14, 2026 at 2:25 pm

    Apache 2.x Virtual Hosts

    1) You need this prior to your VirtualHosts sections:

    # Ensure that Apache listens on port 80
    Listen 80
    
    # Listen for virtual host requests on all IP addresses
    NameVirtualHost *:80
    

    2) Each section needs a DocumentRoot and a ServerName item:

    <VirtualHost 172.20.30.50>
    DocumentRoot /www/example1
    ServerName www.example1.com
    
    # Other directives here ...
    
    </VirtualHost>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several cron jobs and I'd like to perform some calculations on them,
I have several models grouped in a module like this: #/app/models/blobs/small_text.rb class Blobs::SmallText <
I have several virtualhosts configured on a single Jetty instance. I would like to
I have apache web server with several virtualhosts I would like all of them
I have several (as in 100s) spreadsheets using an addin (let's call it Addin2003).
I have several reports using MS ReportViewer. The reports are showing the standard ReportViewer
We have several Visual Studio projects, and we would like to: enable/disable some defines
I have several different sites in different hosts and I use the same JS
I have several domains that I would like to have wildcard subdomains enabled for
I have a VPS and i'm trying to host several SVN projects. I'd like

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.